Toctree behavior of with :hidden:

382 views
Skip to first unread message

Sidney Cadot

unread,
May 27, 2021, 4:38:03 AM5/27/21
to sphinx...@googlegroups.com
Hello,

According to the docs, the :hidden: option of a toctree directive does this:

[...] This will still notify Sphinx of the document hierarchy, but not insert links into the document at the location of the directive – this makes sense if you intend to insert these links yourself, in a different style, or in the HTML sidebar.

However, it seems it has another side effect: the hidden sub-documents also do not show up on higher-level ToC's, that are themselves not hidden.

Suppose I want to have a sub-toctree, and I want to not add a visible ToC at the place of that directive, but I /do/ want the toctree entries to show up at a higher level (for example, a documentation-global table of contents), how should I do that?

Best, Sidney


Stefano David

unread,
May 27, 2021, 12:23:54 PM5/27/21
to sphinx-users
Hi,

If I understand correctly, you should add :includehidden: to the global toctree.

HTH,
Stefano
 
Reply all
Reply to author
Forward
0 new messages