File tree Expand file tree Collapse file tree 5 files changed +19
-5
lines changed
Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 11{{- define "main" }}
22 < div class ="hb-docs ">
33 < div class ="hb-docs-sidebar " tabindex ="-1 " data-bs-hide ="focusout ">
4- {{ partialCached "hb/modules/docs/nav" . .FirstSection }}
4+ {{ $rootSection := partialCached "hb/modules/docs/functions/root-section" . . }}
5+ {{ partialCached "hb/modules/docs/nav" . $rootSection }}
56 </ div >
67 < div class ="hb-docs-main col-12 col-xxl-10 ">
78 {{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-main-begin") }}
Original file line number Diff line number Diff line change 11{{- define "main" }}
22 < div class ="hb-docs ">
33 < div class ="hb-docs-sidebar " tabindex ="-1 " data-bs-hide ="focusout ">
4- {{ partialCached "hb/modules/docs/nav" . .FirstSection }}
4+ {{ $rootSection := partialCached "hb/modules/docs/functions/root-section" . . }}
5+ {{ partialCached "hb/modules/docs/nav" . $rootSection }}
56 </ div >
67 < div class ="hb-docs-main ">
78 {{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-main-begin") }}
Original file line number Diff line number Diff line change 1+ {{- $section := .FirstSection }}
2+ {{- if not (default true $section.Params.docs_root_section) }}
3+ {{- with index .Ancestors.Reverse 2 }}
4+ {{- $section = . }}
5+ {{- else }}
6+ {{- if .IsSection }}
7+ {{- $section = . }}
8+ {{- end }}
9+ {{- end }}
10+ {{- end }}
11+ {{- return $section }}
Original file line number Diff line number Diff line change 1- {{/* Returns the pages tree of first section of current page. */}}
2- {{- $tree := partial "hb/modules/docs/functions/walk-section" .FirstSection }}
1+ {{/* Returns the pages tree of the root section of current page. */}}
2+ {{- $tree := partial "hb/modules/docs/functions/walk-section" . }}
33{{- return $tree -}}
Original file line number Diff line number Diff line change 1- {{- $tree := partialCached "hb/modules/docs/functions/tree" . .FirstSection }}
1+ {{- $rootSection := partialCached "hb/modules/docs/functions/root-section" . . }}
2+ {{- $tree := partialCached "hb/modules/docs/functions/tree" $rootSection $rootSection }}
23< div
34 class ="hb-docs-nav offcanvas-lg pe-lg-2 offcanvas-start "
45 aria-labelledby ="hb-docs-nav-label ">
You can’t perform that action at this time.
0 commit comments