From 840e3e0185428db5021d787b32720d933787a84f Mon Sep 17 00:00:00 2001 From: Simon Spannagel Date: Mon, 14 Jul 2025 11:48:37 +0200 Subject: [PATCH] ENH - Allow setting show_nav_level per page --- .../theme/pydata_sphinx_theme/components/sidebar-nav-bs.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html index fd1fd9dfef..4e213ab008 100644 --- a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html +++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html @@ -1,11 +1,12 @@ {# Displays the TOC-subtree for pages nested under the currently active top-level TOCtree element. #} +{% 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 %}