Fix broken links (#16747)

Signed-off-by: Ajay Singh <37625112+Ajay-singh1@users.noreply.github.com>
This commit is contained in:
Ajay Singh 2025-08-25 14:33:19 +05:30 committed by GitHub
parent 521231c610
commit 36c5e1d546
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -161,7 +161,10 @@
{{ if and (eq .Section "docs") .Site.Data.args.archive}}
<div class="archive-warning-banner" role="alert">
{{ (printf (i18n "archive_banner_text") .Site.Data.args.version) | safeHTML }}
<a href="/latest{{ .RelPermalink | safeURL }}">{{ i18n "archive_banner_link" }}</a>
{{ $rel := .RelPermalink }}
{{ $path := replaceRE `^/v[0-9]+\.[0-9]+/` "" $rel }}
{{ $latestURL := printf "https://istio.io/latest/%s" $path }}
<a href="{{ $latestURL | safeURL }}">{{ i18n "archive_banner_link" }}</a>
</div>
{{ end }}