-
I would like to be able to create dropdowns (to also show contents on pages) in the sidebar navigation through a simple parameter for the html_theme_options or something similar, as currently it is unclear as to how to do this (have been searching for 2 hours now) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
See #318 (comment) |
Beta Was this translation helpful? Give feedback.
-
Hmm... Do you have an example of what you're trying to achieve? A screenshot or two might help explain what you want to do, since it's not particularly clear to me what you want to do. |
Beta Was this translation helpful? Give feedback.
-
As @sscherfke has helpfully pointed out, Sphinx supports limiting the depth of the page table of contents (i.e. right sidebar) out of the box, with For reStructuredText source files, you can have the following at the top of your file:
For Markdown source files (using MyST-parser), you can have the following at the top of your file:
(pick whatever number you want; I've arbitrarily shown 5) The relevant section in Sphinx's documentation: https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html#special-metadata-fields |
Beta Was this translation helpful? Give feedback.
As @sscherfke has helpfully pointed out, Sphinx supports limiting the depth of the page table of contents (i.e. right sidebar) out of the box, with
:tocdepth:
metadata in a file.For reStructuredText source files, you can have the following at the top of your file:
For Markdown source files (using MyST-parser), you can have the following at the top of your file:
(pick whatever number you want; I've arbitrarily shown 5)
The relevant section in Sphinx's documentation: https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html#special-metadata-fields