Navigation depth and collapsing sidebars#
By default, this theme enables to expand/collapse subsections in the left sidebar navigation (without actually navigating to the page itself), and this extends up to 4 levels deep:
Control how many navigation levels are shown by default#
You can control how many navigation levels are shown when a page is
loaded. By default, this level is 1, and only top-level pages are shown,
with drop-boxes to reveal their children. To make their children show up by
default, you can use the following configuration in conf.py
:
html_theme_options = {
"show_nav_level": 2
}
This will make the first two navigations show up by default (AKA, top-level pages and their immediate children).
Control the number of navigation levels#
In addition, you can also control how many levels of the navigation are shown in the sidebar (with a default of 4):
html_theme_options = {
"navigation_depth": 2
}
Remove reveal buttons for sidebar items#
It is possible to turn off the expandable navigation entirely by setting the collapse_navigation config option to True:
html_theme_options = {
"collapse_navigation": True
}