Skip to content

Commit 840e3e0

Browse files
committed
ENH - Allow setting show_nav_level per page
1 parent 0ef98d8 commit 840e3e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{# Displays the TOC-subtree for pages nested under the currently active top-level TOCtree element. #}
2+
{% set show_nav_level = meta['html_theme.show_nav_level'] if (meta is defined and meta is not none and 'html_theme.show_nav_level' in meta) else theme_show_nav_level %}
23
<nav class="bd-docs-nav bd-links"
34
aria-label="{{ _('Section Navigation') }}">
45
<p class="bd-links__title" role="heading" aria-level="1">{{ _("Section Navigation") }}</p>
56
<div class="bd-toc-item navbar-nav">
67
{{- generate_toctree_html(
78
"sidebar",
8-
show_nav_level=theme_show_nav_level | int,
9+
show_nav_level=show_nav_level | int,
910
maxdepth=theme_navigation_depth | int,
1011
collapse=theme_collapse_navigation | tobool,
1112
includehidden=theme_sidebar_includehidden | tobool,

0 commit comments

Comments
 (0)