问题
I'm trying to build kind of a dashboard in the index with one tile per subject. Each subject will later have its own folder in source
with it's own md files.
I want each subject to be disconnected to the others. So the previous
button should no go to another subject.
The structure should be something like this: First there is an overview with all subjects, then there is a subpage with one toctree per subject and then each document has its own normal view.
Does anyone have an idea how I would go about it?
Currently I build the index like that, but this doesn't separate the files:
.. 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/*
回答1:
If I understand your request, you want to have an index page for each subject, too. We do that for Pyramid in a couple of places, like so:
docs/index.rst
.. toctree::
:maxdepth: 1
:glob:
api/index
api/*
docs/api/index.rst
.. toctree::
:maxdepth: 1
:glob:
*
Here it is in action:
https://docs.pylonsproject.org/projects/pyramid/en/latest/#api-documentation
The first link goes to:
https://docs.pylonsproject.org/projects/pyramid/en/latest/api/index.html
来源:https://stackoverflow.com/questions/51950428/sphinx-documentation-with-different-separated-subjects