Is it possible to hide one (or all) subsections present in a RST file from the main TOCTree?
Let me describe a little more:
index.rst
:doc:`Label <path/to/rst/file>`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. toctree::
Label <path/to/rst/file>
Label <path/to/rst/file>
Label of Children TOCTree <path/to/rst/children/file>
children/file.rst
Children Title
==============
.. toctree::
Label of Grandchildren 1
Label of Grandchildren 2
Subsection 1
------------
Subsection 2
------------
Subsection 3
------------
These files, after built, will result, in main TOCTree:
- Label
- Label
- Label of Children
- Label of Grandchildren 1
- Label of Grandchildren 2
- Subsection 1
- Subsection 2
- Subsection 3
And I would like to hide the Subsections, keeping only the TOCTrees, as many and as deep as I want. E.g:
- Label
- Label
- Label of Children
- Label of Grandchildren 1
- Label of Grandchildren 2
But, if the hyperlink associated to Label of Children is clicked, the Subsections are listed as usual;
titlesonly
option is what you are looking for. See sphinx-doc.org/markup/toctree.html. – mzjn