【问题标题】:How to remove repeating "toc" from the bottom of the index page in sphinx?如何从 sphinx 的索引页底部删除重复的“toc”?
【发布时间】:2022-09-24 13:37:12
【问题描述】:

这是我的index.rst

Welcome to the documentation!
=============================

.. include:: readme.rst

.. _INTRODUCTION::
.. toctree::
   :maxdepth: 1
   :caption: Introduction

   readme

.. toctree::
   :maxdepth: 1
   :caption: Contents:

   gazetimation


Indices and tables
==================

* :ref:`genindex`

这是我得到的:

如何摆脱作者部分下方的重复目录?

    标签: python-sphinx toctree


    【解决方案1】:

    使用:hidden: option for toctree

    您还可以为指令提供“隐藏”选项,如下所示:

    .. toctree::
        :hidden:
    
        doc_1
        doc_2
    

    这仍然会通知 Sphinx 文档层次结构,但不会将链接插入到指令位置的文档中 - 如果您打算自己插入这些链接,以不同的样式或在 HTML 侧边栏中插入这些链接是有意义的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-17
      • 2012-09-02
      • 1970-01-01
      相关资源
      最近更新 更多