sphinx/autodoc toc未列出子弹
我有以下结构的小存储库:
|- doc/
|- conf.py
|- index.rst
|- ...
|- src/dashtutorial/
|- __init__.py
|- data/
| |- __init__.py
| |- types.py
|- gui/
|- __init__.py
|- components/
| |- __init__.py
| |- ...
|- ...
|- ...
我正在使用sphinx的sphinx-apidoc
和napoleon
,并且可以成功地构建文档并查看HTML输出。
但是,由于某种原因,我在侧栏中看到 no toc/package路径(我正在使用rtd
主题)。 所有内容都在那里,我可以使用索引或搜索页面对文档的每个内容进行操纵。 一旦我移动到一个内容,唯一的 当前软件包将显示在侧栏中。
结果模块。RST
文件仅列出root/main软件包dashtutorial
。
src
===
.. toctree::
:maxdepth: 4
dashtutorial
这是index.rst
文件:
.. Dash Tutorial documentation master file, created by
sphinx-quickstart on Fri Jul 8 10:54:39 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Dash Tutorial's documentation!
=========================================
.. toctree::
:maxdepth: 4
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
我在conf.py
中插入了所有路径:
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../src/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/data/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/gui/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/gui/components/'))
编辑:运行后进行清洁
和html
,我接收... \ modules.rst:警告:任何toctree
edit2:document int of toctree
edit2:是否有任何必不可少的东西可以构建基本TOC结构,我我失踪了吗?
I have a small repository of the following structure:
|- doc/
|- conf.py
|- index.rst
|- ...
|- src/dashtutorial/
|- __init__.py
|- data/
| |- __init__.py
| |- types.py
|- gui/
|- __init__.py
|- components/
| |- __init__.py
| |- ...
|- ...
|- ...
I'm using sphinx's sphinx-apidoc
and napoleon
and I can successfully build the documentation and view the html output.
However, for some reason, I see no TOC/package paths in the side bar (I'm using the rtd
theme).
All contents are there, I can use the index or search page to maneuver to every content of the documentation.
Once I moved to a content, only the current package is displayed in the side bar.
The resulting modules.rst
file only lists the root/main package dashtutorial
.
src
===
.. toctree::
:maxdepth: 4
dashtutorial
This is the index.rst
file:
.. Dash Tutorial documentation master file, created by
sphinx-quickstart on Fri Jul 8 10:54:39 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Dash Tutorial's documentation!
=========================================
.. toctree::
:maxdepth: 4
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
I inserted all paths in the conf.py
:
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../src/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/data/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/gui/'))
sys.path.insert(0, os.path.abspath('../src/dashtutorial/gui/components/'))
EDIT: After running make clean
and make html
, I receive ...\modules.rst: WARNING: document isn't included in any toctree
EDIT2: Is there anything essential to subpackages building the basic TOC structure, that I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论