【发布时间】:2019-04-22 04:33:46
【问题描述】:
我的问题很难用语言来表达。我会尽力而为。
使用 Sphinx 2.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
这很好用。
我现在的结构有点像这样:
现在让我们使用"software" toctree 索引页面
.. toctree::
:maxdepth: 1
quick urls here
Getting Started
===============
.. toctree::
:maxdepth: 1
docs here
WPILib Overview
===============
.. toctree::
:maxdepth: 1
docs here
这给了我一个如下所示的页面:
但是,问题在于您何时开始导航到子子目录树。当您进入“WPILib Overview”部分时,顶部导航栏显示为“Getting Started”,这在其他部分中也可以重现。
在上图中,它应该显示“WPILib Overview”而不是“Getting Started”。不幸的是,它没有。
源代码公开在:https://github.com/daltz333/frc-docs 网页来源及问题网址:https://frc-docs.rtfd.io/en/develop
我想不出任何解决方案,除了将每个部分都分解成自己的文件,这不是一个选项。
【问题讨论】:
-
您找到解决方法了吗?如果是,请添加答案。
标签: python-sphinx sidebar navigationbar read-the-docs toctree