diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 5aef757b4bfc3..649c603e88d7a 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -23,7 +23,26 @@ {{ $currentPage := .}} {{ range .Site.Menus.main }} {{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }} - {{ if .HasChildren }} + {{ if and (eq .Identifier "docs") (eq $.Section "docs") (not $.Site.Data.args.archive) }} + + {{else if .HasChildren }} + + +{{ $mainUrl := printf "https://istio.io/v%s/docs" $mainVerStr }} + + + +{{ range $i := seq 1 (sub $versionCount 1) }} + {{ $currentMinor := sub $minor $i }} + {{ if ge $currentMinor 0 }} + {{ $ver := printf "v%d.%d" $major $currentMinor }} + {{ $url := printf "https://istio.io/%s/docs" $ver }} + + {{ end }} +{{ end }}