Skip to content

Commit 2b3826f

Browse files
authored
Manual Cherry Pick (#16825)
1 parent 30ae3ae commit 2b3826f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

layouts/_default/baseof.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@
161161
{{ if and (eq .Section "docs") .Site.Data.args.archive}}
162162
<div class="archive-warning-banner" role="alert">
163163
{{ (printf (i18n "archive_banner_text") .Site.Data.args.version) | safeHTML }}
164-
<a href="/latest{{ .RelPermalink | safeURL }}">{{ i18n "archive_banner_link" }}</a>
164+
{{ $rel := .RelPermalink }}
165+
{{ $path := replaceRE `^/v[0-9]+\.[0-9]+/` "" $rel | strings.TrimPrefix "/" }}
166+
{{ $latestURL := printf "https://istio.io/latest/%s" $path }}
167+
<a href="{{ $latestURL | safeURL }}">{{ i18n "archive_banner_link" }}</a>
165168
</div>
166169
{{ end }}
167170

0 commit comments

Comments
 (0)