Skip to content

Commit 36c5e1d

Browse files
authored
Fix broken links (#16747)
Signed-off-by: Ajay Singh <[email protected]>
1 parent 521231c commit 36c5e1d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

layouts/_default/baseof.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<meta property="og:image" content="https://raw.githubusercontent.com/istio/istio.io/master/static/img/istio-social.png">
4141
<meta property="og:image:alt" content="The Istio sailboat logo">
4242
<meta property="og:image:width" content="4096">
43-
<meta property="og:image:height" content="2048">
43+
<meta property="og:image:height" content="2048">
4444
{{ end }}
4545
<meta property="og:site_name" content="Istio">
4646

@@ -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 }}
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)