From 568553394d0a8b34668a75c9839a0f1f426469b2 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 6 Oct 2019 21:10:46 +0200 Subject: theme: Switch to docsy theme --- themes/docsy/layouts/partials/sidebar.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 themes/docsy/layouts/partials/sidebar.html (limited to 'themes/docsy/layouts/partials/sidebar.html') diff --git a/themes/docsy/layouts/partials/sidebar.html b/themes/docsy/layouts/partials/sidebar.html new file mode 100644 index 0000000..bf568e2 --- /dev/null +++ b/themes/docsy/layouts/partials/sidebar.html @@ -0,0 +1,14 @@ +{{/* The "active" toggle here may delay rendering, so we only cache this side bar menu for bigger sites. */}} +{{ $shouldCache := ge (len .Site.Pages) 2000 }} +{{ if $shouldCache }} +{{ $mid := printf "m-%s" (.RelPermalink | anchorize) }} + +{{ partialCached "sidebar-tree.html" . .CurrentSection.RelPermalink }} +{{ else }} +{{ partial "sidebar-tree.html" . }} +{{ end }} -- cgit v1.2.3