I've got something like this:
.. toctree::
:maxdepth: 2
:caption: Contents:
:hidden:
:glob:
docs
frontend
backend
tools/*
I'd like all the documents found in the tools
directory to collapse into one expandable sidebar TOC entry. Should be possible, but I can't find a clue.
I use sphinx_rtd_theme
.
To put it another way: suppose I have a very long document like this (tools.rst
):
Section 1
*********
Subsection 1
============
Subsection 2
============
Subsection 3
============
How am I supposed to split it by the subsection and preserve the document structure, without resorting to includes, which don't sit well with Sphinx anyway.
tools/example.rst
? Are you saying that the subsections do not appear in the sidebar navigation? Did you try:maxdepth: 3
? – Eudosiatools.rst
with one section heading in mysource
directory; I'd like to split it intosource/tools
and preserve the structure (a single section heading). I did not manage it. – Monachismtools.rst
nortools
is in thetoctree
. That is why it does not appear in the navigation. You must have one of them in thetoctree
listing for it to appear. – Eudosiaindex.rst
. Of course,tools.rst
initially was present in theindex.rst
. I did not manage to split and move it intosource/tools
and preserve the appearance and hierarchy. The Section no longer is root to Subsections. Include directives work, by the way, but they are ugly and cumbersome. – Monachism