I have a directory containing various folders, with each of them having matlab source files in them. Some of these folders have sub-folders containing matlab source files.
How can I create a TOC tree with Sphinx to contain the sub-folders in a nested way?
For example, when Main-Directory contains conf.py, index.rst, and moduleslist.rst along with the following folder structure:
Folder1
abc.m
def.m
Folder2
Folder2.1
ghi.m
jkl.m
with this index.rst file:
.. toctree::
:maxdepth: 1
moduleslist
and this moduleslist.rst file:
.. toctree::
:maxdepth: 2
Folder1
=========
.. automodule:: Folder1
:members:
Folder2
=========
.. automodule:: Folder2
:members:
But this does not include the sub-folder Folder2.1 and files in it. I have tried adding Folder2/index in index.rst, with the Folder2/index.rst containing the automodule for Folder2.1, which didn't include documentation of ghi.m.
How can I get Sphinx to show nested sub-folders in it's TOC tree?