diff --git a/layouts/partials/docs-nav.html b/layouts/partials/docs-nav.html index 1a74d9f4490..d411c906e76 100644 --- a/layouts/partials/docs-nav.html +++ b/layouts/partials/docs-nav.html @@ -1,16 +1,21 @@ {{ $.Scratch.Set "topLevel" . }} -{{ $.Scratch.Set "secondLevel" . }} +{{ range .Site.Sections }} + {{if $.CurrentSection}} + {{ if .IsAncestor $.CurrentSection }} + {{ $.Scratch.Set "topLevel" . }} + {{end}} + {{end}} +{{end}}