相关疑难解决方法(0)

如何在Sphinx TOC中包含`genindex`?

Sphinx genindex在构建文档时会生成一个名为的索引,因此禁止在文档中使用该名称。现在,如何在目录中包含指向该索引的链接?

我已经试过了:

.. toctree::
   :maxdepth: 2

   genindex
   api


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

* :ref:`genindex`
Run Code Online (Sandbox Code Playgroud)

尽管最后一行确实创建了到文档中该索引的链接,但是在创建目录时,构建不知道引用:

WARNING: toctree contains reference to nonexisting document 'genindex'
Run Code Online (Sandbox Code Playgroud)

python-sphinx

10
推荐指数
1
解决办法
3143
查看次数

标签 统计

python-sphinx ×1