2024-04-27 12:38:19 +00:00
|
|
|
{{- /* based on Hugo 0.125.5 alias.html */}}
|
2022-11-19 15:05:59 +00:00
|
|
|
<!DOCTYPE html>
|
2022-12-04 09:58:16 +00:00
|
|
|
<html>
|
2022-11-19 15:05:59 +00:00
|
|
|
<head>
|
2023-06-09 09:11:00 +00:00
|
|
|
{{- $url := .Permalink }}
|
|
|
|
{{- if site.BaseURL }}
|
|
|
|
{{- $url = replace .Permalink site.BaseURL "/" }}
|
|
|
|
{{- end }}
|
|
|
|
{{- $url = replace $url "//" "/" }}
|
2022-12-11 22:18:59 +00:00
|
|
|
{{- with site.Home.GetPage $url }}
|
2024-04-24 21:05:13 +00:00
|
|
|
{{- /* if defaultContentLanguageInSubdir=false we are ending here for home page of the default language */}}
|
2024-08-29 10:28:34 +00:00
|
|
|
{{- $url = partial "permalink.gotmpl" (dict "to" .) }}
|
2022-12-11 22:18:59 +00:00
|
|
|
{{- else }}
|
|
|
|
{{- $url_alt := replaceRE "^/[^/]*(/.*)" "${1}" $url }}
|
|
|
|
{{- with site.Home.GetPage $url_alt }}
|
2024-04-24 21:05:13 +00:00
|
|
|
{{- /* if defaultContentLanguageInSubdir=true we are ending here for home page */}}
|
2024-08-29 10:28:34 +00:00
|
|
|
{{- $url = partial "permalink.gotmpl" (dict "to" .) }}
|
2022-12-11 22:18:59 +00:00
|
|
|
{{- else }}
|
2024-04-24 21:05:13 +00:00
|
|
|
{{- /* for regular aliases we are ending here with no original page found */}}
|
2024-08-29 10:28:34 +00:00
|
|
|
{{- $url = partial "permalink.gotmpl" (dict "link" $url) }}
|
2022-12-11 22:18:59 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2022-11-19 15:05:59 +00:00
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="robots" content="noindex">
|
|
|
|
<meta http-equiv="refresh" content="0; url={{ $url }}">
|
2024-04-22 20:43:59 +00:00
|
|
|
{{- $link := "<link href=\"%s\" rel=\"%s\">" }}
|
2022-11-19 15:05:59 +00:00
|
|
|
<title>{{ $url }}</title>
|
2024-05-03 16:50:00 +00:00
|
|
|
{{ (printf $link $url "canonical") | safeHTML }}
|
2022-11-19 15:05:59 +00:00
|
|
|
</head>
|
|
|
|
</html>
|