Skip to content

request new feature for combining or extending toc-trees #4546

Description

@eflanigan00

I often want to do something like the following:

.. toctree::
   :maxdepth: 2

   folder1/file1
   folder1/file2

.. toctree::
   :maxdepth: 1

   folder1/file3

.. toctree::
   :maxdepth: 2

   folder1/file4
   folder1/file5

But I want to have all the contents appear on the top page without the space in between the toctrees.

I'm aware that I can place `:tocdepth: 1' in file3. The problem with that is that the table of contents displayed in the sidebar on the file3 subpage is way too short. I want that sidebar to contain the full set of information.

Could you add some sort of syntax to allow this:

.. toctree::
   :maxdepth: 2

   folder1/file1
   folder1/file2

.. toctree::
   :maxdepth: 1
   :extendtree: True

   folder1/file3

.. toctree::
   :maxdepth: 2
   :extendtree: True

   folder1/file4
   folder1/file5

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions