From 1e4338cd972ed8eef2f1a1f0d706548efd7c43fd Mon Sep 17 00:00:00 2001 From: Illia Volochii Date: Tue, 20 Jan 2026 00:21:41 +0200 Subject: [PATCH] fix: respect the page parameter `toc` in the mobile dropdown (#905) --- layouts/_partials/sidebar.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_partials/sidebar.html b/layouts/_partials/sidebar.html index 52928cd..40e9a5e 100644 --- a/layouts/_partials/sidebar.html +++ b/layouts/_partials/sidebar.html @@ -90,7 +90,7 @@
  • {{- $linkTitle := partial "utils/title" . -}} {{- template "sidebar-item-link" dict "context" . "active" $active "title" $linkTitle "link" .RelPermalink -}} - {{- if and $toc $active -}} + {{- if and $toc $active (ne .Params.toc false) -}} {{- template "sidebar-toc" dict "page" . -}} {{- end -}} {{- template "sidebar-tree" dict "context" . "page" $page "pageURL" $pageURL "level" (add $level 1) "toc" $toc -}} @@ -106,7 +106,7 @@ {{- $linkTitle := partial "utils/title" . -}}
  • {{- template "sidebar-item-link" dict "context" . "active" $active "title" $linkTitle "link" .RelPermalink -}} - {{- if and $toc $active -}} + {{- if and $toc $active (ne .Params.toc false) -}} {{ template "sidebar-toc" dict "page" . }} {{- end }} {{ template "sidebar-tree" dict "context" . "page" $page "pageURL" $pageURL "level" (add $level 1) "toc" $toc }}