Cannot Get TOCTREE in Sphinx to Show Link(无法在Sphinx中获取TOCTREE以显示链接)
本文介绍了无法在Sphinx中获取TOCTREE以显示链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新来的斯芬克斯。我尝试了该教程,但未能在内容中生成链接。我收到的错误
C:Usersmhaikalmsphinxtestsourceindex.rst:11: WARNING: toctree contains refe
rence to document 'intro' that doesn't have a title: no link will be generated
C:Usersmhaikalmsphinxtestsourceindex.rst:11: WARNING: toctree contains refe
rence to document 'zuhdi' that doesn't have a title: no link will be generated
writing additional files... (0 module code pages) genindex search
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded, 3 warnings.
Build finished. The HTML pages are in build/html.
我在与index.rst
相同的目录中创建了zuhdi.rst
和intro.rst
。如何为文档添加标题?
仅供参考,My index.rst包含以下行:
Contents:
.. toctree::
:maxdepth: 2
intro
zuhdi
是否必须存在文档才能将链接放入目录树中?intro.rst
和zuhdi.rst
只是一个空文件。
推荐答案
您收到此错误,因为您在intro.rst
中没有标题。
要解决此问题,请向intro.rst
添加标题。假设您希望标题为My Title
,则可以通过将以下两行作为intro.rst
的第一行来添加标题:
My Title
*********
请注意,您必须有足够的*
个字符来为您的书目添加完整的下划线,否则您将收到有关错误的书目或其下划线的另一个错误。
这篇关于无法在Sphinx中获取TOCTREE以显示链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:无法在Sphinx中获取TOCTREE以显示链接


猜你喜欢
- 使用公司代理使Python3.x Slack(松弛客户端) 2022-01-01
- CTR 中的 AES 如何用于 Python 和 PyCrypto? 2022-01-01
- 我如何卸载 PyTorch? 2022-01-01
- ";find_element_by_name(';name';)";和&QOOT;FIND_ELEMENT(BY NAME,';NAME';)";之间有什么区别? 2022-01-01
- 检查具有纬度和经度的地理点是否在 shapefile 中 2022-01-01
- 如何使用PYSPARK从Spark获得批次行 2022-01-01
- YouTube API v3 返回截断的观看记录 2022-01-01
- 使用 Cython 将 Python 链接到共享库 2022-01-01
- 我如何透明地重定向一个Python导入? 2022-01-01
- 计算测试数量的Python单元测试 2022-01-01