我的问题很难用语言表达。我会尽我所能。
使用Sphinx2.0.0,我有一个具有以下“根”树的项目。这是索引树:
Welcome to FIRST Robotics Documentation
========================================================
.. toctree::
:maxdepth: 2
:caption: WPILib Software
software
.. toctree::
:maxdepth: 2
:caption: WPILib Hardware
hardware
.. toctree::
:maxdepth: 2
:caption: Robot Networking
networking这个很好用。
我现在有一个看起来有点像这样的结构:

现在让我们使用“软件”树索引页面
.. toctree::
:maxdepth: 1
quick urls here
Getting Started
===============
.. toctree::
:maxdepth: 1
docs here
WPILib Overview
===============
.. toctree::
:maxdepth: 1
docs here这给了我一页,看起来是这样的:

但是,问题是当您开始导航到子子树时。当您进入"WPILib概述“部分时,顶部的导航栏显示为”入门“,这在其他部分也是可复制的。

在上面的图片中,它应该显示"WPILib概述“而不是”入门“。不幸的是,事实并非如此。
源代码可公开查阅:https://github.com/daltz333/frc-docs网页源代码和问题网址:https://frc-docs.rtfd.io/en/develop
我想不出任何解决方案,除了将每个部分分解到它自己的文件中外,这是而不是的一个选项。
发布于 2019-10-10 13:12:50
您需要将navigation_depth设置为html_theme_options在conf.py中的一个属性,即:
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
'navigation_depth': 2
}有关更多信息,请参见关于主题选项配置的他们的文件。
https://stackoverflow.com/questions/55789145
复制相似问题