github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/alias.html (about) 1 <!DOCTYPE html> 2 <html> 3 <head> 4 {{- $url := .Permalink }} 5 {{- if site.BaseURL }} 6 {{- $url = replace .Permalink site.BaseURL "/" }} 7 {{- end }} 8 {{- $url = replace $url "//" "/" }} 9 {{- with site.Home.GetPage $url }} 10 {{- $c := "" }}{{/* if defaultContentLanguageInSubdir=false we are ending here for home page of the default language */}} 11 {{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} 12 {{- else }} 13 {{- $url_alt := replaceRE "^/[^/]*(/.*)" "${1}" $url }} 14 {{- with site.Home.GetPage $url_alt }} 15 {{- $c := "" }}{{/* if defaultContentLanguageInSubdir=true we are ending here for home page */}} 16 {{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} 17 {{- else }} 18 {{- $c := "" }}{{/* for regular aliases we are ending here with no original page found */}} 19 {{- $url = partial "relLangPrettyUglyURL.hugo" (dict "link" $url) }} 20 {{- end }} 21 {{- end }} 22 <meta charset="utf-8"> 23 <meta name="robots" content="noindex"> 24 <meta http-equiv="refresh" content="0; url={{ $url }}"> 25 {{- $link := "<link href=\"%s\" rel=\"%s\" type=\"%s\" title=\"%s\">" }} 26 <title>{{ $url }}</title> 27 28 {{ (printf $link $url "canonical" "text/html" ($url | htmlEscape)) | safeHTML }} 29 </head> 30 </html>