diff --git a/assets/css/v2/style.css b/assets/css/v2/style.css index bf020138..4b7e9669 100644 --- a/assets/css/v2/style.css +++ b/assets/css/v2/style.css @@ -937,6 +937,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon { display: none; } +.current ~ nav, .collapsible-content li ul li:has(.current) > nav { /* Open TOC for current page */ display: block !important; diff --git a/layouts/partials/sidebar-v2.html b/layouts/partials/sidebar-v2.html index 5008508d..a1de7399 100644 --- a/layouts/partials/sidebar-v2.html +++ b/layouts/partials/sidebar-v2.html @@ -79,6 +79,11 @@ {{ end }} {{ .Title }} + {{ if eq $.Permalink .Permalink }} + {{- with .TableOfContents -}} + {{- . -}} + {{- end -}} + {{ end }} {{ end }} {{ end }}