blackbirdchess-docker-dev/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/nav.html

20 lines
428 B
HTML

{{ $currentNode := . }}
{{ range .Site.Menus.main.ByWeight }}
{{ $.Scratch.Set "currentMenuEntry" . }}
<li>
{{ if .HasChildren }}
<span class="section">{{ .Name | title }}</span>
<ul>
{{ range .Children }}
{{ $.Scratch.Set "currentMenuEntry" . }}
{{ partial "nav_link" $currentNode }}
{{ end }}
</ul>
{{ else }}
{{ partial "nav_link" $currentNode }}
{{ end }}
</li>
{{ end }}