【问题标题】:How to display only the document titles on the index.html如何仅显示 index.html 上的文档标题
【发布时间】:2018-05-19 12:04:09
【问题描述】:

在我的sphinx-build 生成的文档中,索引页面显示Document titleSection Title 链接。

==============
Document Title
==============

Section Title
-----------------

我不希望Section Title显示在索引页面上,

所以我更改了第一个以使用字幕格式,但它仍然出现在索引页面上。如何解决这个问题?

==============
Document Title
==============

Section Title (Document Subtitle)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

【问题讨论】:

    标签: python-sphinx restructuredtext


    【解决方案1】:

    我找到了解决方案,在 index.rst 上将 maxdepth 设置为 1(之前是 2)可以提供所需的行为。

    .. toctree::
       :maxdepth: 1
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-26
      相关资源
      最近更新 更多