Skip to content

Multiple toctrees with captions #37

Open
@tristanlins

Description

@tristanlins

I write a "big" documentation that covers multiple components.
In the main index.rst multiple toctrees are used like this:

.. toctree::
   :name: toc_index
   :maxdepth: 1

   root/page1
   root/page2
   root/page3

.. toctree::
   :caption: Component A
   :name: toc_component_a
   :maxdepth: 1

   compA/page1
   compA/page2
   compA/page3

.. toctree::
   :caption: Component B
   :name: toc_component_b
   :maxdepth: 1

   compB/page1
   compB/page2
   compB/page3

The captions in navigation are not styled properly.
I've added a custom css for these captions:

div.sphinxsidebar .sidebar-toc .caption {
    margin: 17px 0 0 0;
    padding: 0 22px 6px;
    font-size: 14px;
    font-weight: bold;
    color: #606060;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions