Skip to content

Commit

Permalink
Introduce navigation_startdepth parameter
Browse files Browse the repository at this point in the history
Allows users to start the sidebar Toc at level 0

Addresses issue pydata#1181
  • Loading branch information
SimenZhor committed Mar 11, 2023
1 parent 39aa0d7 commit 3303d22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
"navbar_align": "left", # [left, content, right] For testing that the navbar items align properly
"navbar_center": ["version-switcher", "navbar-nav"],
"announcement": "https://raw.githubusercontent.com/pydata/pydata-sphinx-theme/main/docs/_templates/custom-template.html",
"navigation_startdepth": 0,
# "show_nav_level": 2,
# "navbar_start": ["navbar-logo"],
# "navbar_end": ["theme-switcher", "navbar-icon-links"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{# Create the sidebar links HTML here to re-use in a few places #}
{# If we have no sidebar links, pop the links component from the sidebar list #}
{%- set sidebar_nav_html = generate_toctree_html("sidebar",
startdepth=theme_navigation_startdepth|int,
show_nav_level=theme_show_nav_level|int,
maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ search_bar_text = Search the docs ...
search_bar_position = sidebar
navigation_with_keys = True
collapse_navigation = False
navigation_startdepth = 1
navigation_depth = 4
show_nav_level = 1
show_toc_level = 1
Expand Down

0 comments on commit 3303d22

Please sign in to comment.