Zan*_*dar 5 python python-sphinx toctree
尝试使用 Sphinx 生成文档。
第一次使用:sphinx-apidoc
然后使用:sphinx-build html
我收到了有关该文件的警告modules.rst。文件存在,html 也生成了,它看起来绝对像一个目录。
index.rst我阅读了我能找到的有关该主题的所有主题,但没有解决问题(使用指令正确定位文件中的模块声明.. include::...)
我不知道该怎么做才能让它发挥作用
这是我的文件的副本index.rst,也许您会看到我看不到的东西。生成的第一个文件位于sources文件夹中
Welcome to documentation!
=====================================
.. toctree::
:maxdepth: 4
:caption: Contents:
modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Run Code Online (Sandbox Code Playgroud)
我也收到这样的消息:
..\doc\sphinx\index.rst:4: WARNING: toctree contains reference to nonexisting document u'modules'
Run Code Online (Sandbox Code Playgroud)
如果我用另一个文档替换模块,我会得到以下信息:
\doc\sphinx\index.rst:4: WARNING: toctree contains reference to nonexisting document u'opsimtest'
looking for now-outdated files... none found
pickling environment... done
checking consistency... \doc\sphinx\_apidocs\modules.rst: WARNING: document isn't included in any toctree
Run Code Online (Sandbox Code Playgroud)
所以看起来即使我在目录树中命名另一个文档,它仍然在寻找modules.rst(并且没有看到另一个文档,但是它内置于html文件中)
在本主题中:无法让 sphinx 在 toctree 下链接到另一个文档,错误消息指出intro.rst而不是modules.rst。编辑:正如我所说,不幸的是我已经阅读了其他线程,但他们没有解决我的问题。它还是坏了。
在休息中,空白是有意义的。指令及其选项必须用空行与其内容分隔。
.. toctree::
:maxdepth: 4
:caption: Contents:
_apidocs/modules
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9280 次 |
| 最近记录: |