小编use*_*710的帖子

将子文件夹中的文件添加到sphinx文档中(sphinxcontrib-matlabdomain)

我有一个包含各种文件夹的目录,每个文件夹都包含matlab源文件.其中一些文件夹包含包含matlab源文件的子文件夹.

如何使用Sphinx创建TOC树以嵌套方式包含子文件夹?

例如,当Main-Directory包含conf.py,index.rst以及moduleslist.rst以下文件夹结构时:

    Folder1
        abc.m
        def.m
    Folder2
        Folder2.1
            ghi.m
        jkl.m
Run Code Online (Sandbox Code Playgroud)

用这个index.rst文件:

.. toctree::
    :maxdepth: 1

    moduleslist
Run Code Online (Sandbox Code Playgroud)

和这个moduleslist.rst文件:

.. toctree::
    :maxdepth: 2

Folder1
=========
.. automodule:: Folder1
:members:

Folder2
=========
.. automodule:: Folder2
    :members:
Run Code Online (Sandbox Code Playgroud)

但是这不包括子文件夹Folder2.1和文件.我曾尝试加入Folder2/indexindex.rst,与Folder2/index.rst载有automodule Folder2.1,其中不包括的文件ghi.m.

如何让Sphinx在其TOC树中显示嵌套的子文件夹?

documentation matlab documentation-generation python-sphinx read-the-docs

7
推荐指数
1
解决办法
1712
查看次数