directory - 具有不同独立主题的 Sphinx 文档

标签 directory python-sphinx glob read-the-docs toctree

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

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

结构应该是这样的: enter image description here 首先是所有主题的概述,然后是一个子页面,每个主题有一个目录树,然后每个文档都有自己的正常 View 。

有人知道我该怎么做吗?

目前我像这样构建索引,但这不会分隔文件:

.. 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

第一个链接指向:

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

关于directory - 具有不同独立主题的 Sphinx 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51950428/

相关文章:

python - 如何为不同的蜘蛛设置相同的缓存文件夹,现在scrapy在缓存目录中为每个蜘蛛创建子文件夹

python-sphinx - 在重组文本中将长列表分成多列

python-sphinx - 如何在 python-sphinx 中突出显示文本?

c - argv : Sanitizing wildcards

python - 创建图像数据的pickeled数据文件

Linux 查找命令 shell 扩展

c# - 有没有办法停止 Directory.GetFiles 搜索

python - 使用文件夹名称重命名文件夹中的所有图像

directory - Dart 中有复制目录的内置函数吗?

python 狮身人面像 "the module executes module level statement and it might call sys.exit()."