diff --git a/layouts/partials/components/sidebar/footer.html b/layouts/partials/components/sidebar/bottom.html similarity index 100% rename from layouts/partials/components/sidebar/footer.html rename to layouts/partials/components/sidebar/bottom.html diff --git a/layouts/partials/sidebar-ng.html b/layouts/partials/sidebar-ng.html index 7fb3a71..8e7a6bf 100644 --- a/layouts/partials/sidebar-ng.html +++ b/layouts/partials/sidebar-ng.html @@ -8,9 +8,18 @@ {{- $navRoot := cond (eq site.Home.Type "docs") site.Home $context.FirstSection -}} {{- $pageURL := $context.RelPermalink -}} -{{/* {{ $data := partialCached "components/sidebar/get-section-data" $context $context.Section }} */}} -{{- $data := partial "components/sidebar/generate-section-data" $navRoot | unmarshal -}} -{{- $dataMobile := partial "components/sidebar/generate-section-data" site.Home | unmarshal -}} +{{- $data := slice -}} +{{- $dataMobile := slice -}} + +{{- if (eq site.Params.page.sidebar.source "data") -}} + {{ $data = partialCached "components/sidebar/get-section-data" $context $context.Section }} + {{- $dataMobile = $data -}} +{{- else -}} + {{- $data = (partialCached "components/sidebar/generate-section-data" $navRoot $navRoot) | unmarshal -}} + {{- $dataMobile = (partialCached "components/sidebar/generate-section-data" site.Home site.Home) | unmarshal -}} +{{- end -}} + +{{- $shouldCache := site.Params.page.sidebar.cache | default false -}}
@@ -35,9 +44,13 @@ {{- else -}}