繁体   English   中英

如何让 Sphinx 生成“contents.rst”?

[英]How do I get Sphinx to generate 'contents.rst'?

我使用的 Sphinx 模板(例如sphninxdocsphinx13 )有一个指向“contents.rst”文件的链接; 但是,尽管此文件被记录为 "special" ,但我看不到生成它的方法。

有没有办法让 Sphinx 自动生成“contents.rst” ,还是我需要手动生成它?

当我来到这个页面时,我需要修复.readthedocs.yml 我的 sphinx 配置路径缺少“源”部分:

# Build documentation in the docs/ directory with Sphinx
sphinx:
  configuration: docs/source/conf.py

在配置中,我有

# The master toctree document.
master_doc = 'index'

问题中提到的“特殊” contents.rst文件不会自动生成。 它的编写方式与任何其他 reST 文件一样,并存储在 Python 存储库中: https : //github.com/python/cpython/blob/master/Doc/contents.rst

http://docs.python.org/release/2.7/index.html上的 Python 文档主页有一个完整的目录链接,指向contents.html ,它是从 contents.rst 构建的。

Sphinx 文档的来源包括一个类似的 contents.rst: https : //github.com/sphinx-doc/sphinx/blob/master/doc/contents.rst

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM