具有不同分离主题的 Sphinx 文档

Sphinx Documentation with different separated subjects

我正在尝试在索引中构建一种仪表板,每个主题一个图块。每个主题稍后将在 source 中拥有自己的文件夹,其中包含自己的 md 文件。

我希望每个主题都与其他主题断开连接。所以 previous 按钮不应该转到另一个主题。

结构应该是这样的: 首先是所有主题的概览,然后是每个主题有一个目录树的子页面,然后每个文档都有自己的普通视图。

有人知道我会怎么做吗?

目前我是这样建立索引的,但这并不能分隔文件:

.. toctree::
   :maxdepth: 1
   :name: mastertoc
   :caption: Example Files:
   :glob:

   introduction
   examples

.. toctree::
   :maxdepth: 1
   :name: Subject1
   :caption: Subject1:
   :glob:

   Subject1/*

.. toctree::
   :maxdepth: 1
   :name: Subject2
   :caption: Subject2:
   :glob:

   Subject2/*

如果我理解您的要求,您也希望每个主题都有一个索引页。我们在几个地方为 Pyramid 这样做,例如:

docs/index.rst

.. toctree::
   :maxdepth: 1
   :glob:

   api/index
   api/*

docs/api/index.rst

.. toctree::
   :maxdepth: 1
   :glob:

   *

这是实际操作:

https://docs.pylonsproject.org/projects/pyramid/en/latest/#api-documentation

第一个 link 转到:

https://docs.pylonsproject.org/projects/pyramid/en/latest/api/index.html