我是新来斯芬克斯的。我尝试了教程,但我无法在内容中生成链接。我得到的错误
C:\Users\mhaikalm\sphinxtest\source\index.rst:11: WARNING: toctree contains refe
rence to document 'intro' that doesn't have a title: no link will be generated
C:\Users\mhaikalm\sphinxtest\source\index.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。如何为文档添加标题?
仅供参考,我的index.rst包含以下几行:
Contents:
.. toctree::
:maxdepth: 2
intro
zuhdi文档必须存在才能将链接放入toctree中吗?intro.rst和zuhdi.rst只是一个空文件。
发布于 2012-12-29 15:29:19
您收到此错误是因为您在intro.rst中没有标题。
为了解决这个问题,给intro.rst添加一个标题。假设您希望标题为My Title,则可以通过将以下两行作为intro.rst的第一行来添加标题
My Title
*********请注意,您必须有足够的*字符来为您的标题添加完整的下划线,否则您将收到另一个关于格式错误的标题或其下划线的错误信息。
https://stackoverflow.com/questions/14079655
复制相似问题