如何在 index.html 上仅显示文档标题
How to display only the document titles on the index.html
在我的 sphinx-build 生成的文档中,索引页面显示 Document title
和 Section Title
链接。
==============
Document Title
==============
Section Title
-----------------
我不想 Section Title
显示在索引页上,
所以我把第一个改为使用字幕格式,但它仍然出现在索引页上。如何解决这个问题?
==============
Document Title
==============
Section Title (Document Subtitle)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
我找到了解决方案,在 index.rst 上将 maxdepth
设置为 1
(之前是 2
)给出期望的行为。
.. toctree::
:maxdepth: 1
在我的 sphinx-build 生成的文档中,索引页面显示 Document title
和 Section Title
链接。
==============
Document Title
==============
Section Title
-----------------
我不想 Section Title
显示在索引页上,
所以我把第一个改为使用字幕格式,但它仍然出现在索引页上。如何解决这个问题?
==============
Document Title
==============
Section Title (Document Subtitle)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
我找到了解决方案,在 index.rst 上将 maxdepth
设置为 1
(之前是 2
)给出期望的行为。
.. toctree::
:maxdepth: 1