+
+
{{ $p := . -}}
{{ range .Site.Menus.main -}}
@@ -58,39 +62,41 @@
{{ end -}}
{{ if .Site.Params.versions -}}
- -
+
{{ end -}}
{{ if (gt (len .Site.Home.Translations) 0) -}}
- -
+
{{ end -}}
- {{ if .Site.Params.ui.showLightDarkModeMenu -}}
-
{{ end -}}
+
-
+
{{ partial "search-input.html" . }}
-{{ define "_partials/version-string" }}
- {{ $ret := "unstable version"}}
+{{- define "_partials/version-string" -}}
+ {{ $ret := "unstable version" -}}
- {{ $status := .Site.Params.version.status }}
+ {{ $status := .Site.Params.version.status -}}
- {{ if ne $status "unstable"}}
- {{ $path := path.Join "changelogs" }}
+ {{ if ne $status "unstable" -}}
+ {{ $path := path.Join "changelogs" -}}
- {{/* produces a string similar to "version v1.5" */}}
- {{ $ret = delimit (slice "version v" .Site.Params.version.major "." .Site.Params.version.minor) "" }}
- {{ end }}
+ {{/* produces a string similar to "version v1.5" */ -}}
+ {{ $ret = delimit (slice "version v" .Site.Params.version.major "." .Site.Params.version.minor) "" -}}
+ {{ end -}}
- {{ return $ret }}
-{{ end }}
+ {{ return $ret -}}
+{{- end -}}
diff --git a/layouts/_partials/sidebar-tree.html b/layouts/_partials/sidebar-tree.html
index dba63f3a..e5f00807 100644
--- a/layouts/_partials/sidebar-tree.html
+++ b/layouts/_partials/sidebar-tree.html
@@ -1,37 +1,57 @@
{{- /*
- A modified version of the siderbar-tree.html partial in Docsy, adding:
-
- * The "toc.html" partial at L45.
+ A copy of the siderbar-tree.html partial in Docsy, modified to:
+
+ * Ignore the `sidebarRoot` parameter, because of this regression:
+
+ * Add the "toc.html" partial at L68.
*/ -}}
-{{/* We cache this partial for bigger sites and set the active class client side. */ -}}
-{{ $sidebarCacheLimit := .Site.Params.ui.sidebar_cache_limit | default 2000 -}}
-{{ $shouldDelayActive := ge (len .Site.Pages) $sidebarCacheLimit -}}
+{{ $context := .context -}}
+{{ $sidebarRoot := .sidebarRoot -}}
+{{ $sidebarRootID := .sidebarRootID -}}
+{{ $cacheSidebar := .cacheSidebar -}}
+
+{{ with $context -}}
+{{/* When the sidebar is cached, "active" class is set client side. */ -}}
+{{ $shouldDelayActive := $cacheSidebar -}}
+