html - 狮身人面像 : where did the top navigation bar with the classic theme go?

标签 html css python-sphinx

旧版本的 Sphinx(至少 1.1.3)包含顶部导航栏作为默认主题的一部分。这是 SymPy documentation 中的示例(请注意,我们将默认颜色从蓝色更改为绿色):

enter image description here

我说的是最顶层的酒吧。

Sphinx 的较新版本(至少 1.3.1 以及最新版本 1.4.6)不包含此栏:

enter image description here

它去哪儿了?我该如何取回它?我在 theme options documentation 中没有看到任何对它的引用。 。

最佳答案

事实证明,我们没有声明主题,所以它只是使用默认主题。默认设置曾经是“经典”,但在 1.1.3 和 1.3.1 之间的某个时刻切换到“雪花石膏”。在底部你可以看到它认为它正在使用雪花石膏:

enter image description here

它仍然像“经典”一样渲染,因为我们已将经典 css 文件复制到 _static 目录中以对其进行颜色更改。

解决方案是显式添加

html_theme = 'classic'

conf.py

关于html - 狮身人面像 : where did the top navigation bar with the classic theme go?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39262189/

相关文章:

html - 在我的下拉菜单上添加第三层

javascript - 在 HTML 中使用计时器平滑滚动

python - literalinclude : how to include only a variable using pyobject?

javascript - 网页输出不持久

javascript - 开发 chrome 扩展

javascript - 每个数字周围的框

python - Sphinx 从过时的源代码生成 HTML 输出

html - 如果第一个在 HTML 上找不到,请备份 img

javascript - JavaScript 的基本模态

python - django 文档在本地设置