{{- /* Complements the section-specific sidebar navigation. - Renders the main navigation for site sections, linking to the current or ancestor section/page. - Uses the `site.Menus.main` configuration to determine primary navigation structure. - Toggles visibility of nested menu items for the main sections. */ -}}
{{- $curr := .FirstSection }} {{- if eq $curr site.Home }} {{- $curr = . }} {{- end }} {{- range site.Menus.main }} {{- if or (.Page.IsAncestor page) (eq .Page page) }} {{- $curr = .Page }} {{- end }} {{- end }} {{- with $curr.Params.icon }} {{- partialCached "icon.html" . . -}} {{- end }} {{- $curr.LinkTitle -}}