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 }}
|
|
|
|
{{- $c := "" }}{{/* if defaultContentLanguageInSubdir=false we are ending here for home page of the default language */}}
|
|
|
|
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
|
|
|
{{- else }}
|
|
|
|
{{- $url_alt := replaceRE "^/[^/]*(/.*)" "${1}" $url }}
|
|
|
|
{{- with site.Home.GetPage $url_alt }}
|
|
|
|
{{- $c := "" }}{{/* if defaultContentLanguageInSubdir=true we are ending here for home page */}}
|
|
|
|
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
|
|
|
{{- else }}
|
|
|
|
{{- $c := "" }}{{/* for regular aliases we are ending here with no original page found */}}
|
|
|
|
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "link" $url) }}
|
|
|
|
{{- 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 }}">
|
|
|
|
{{- $link := "<link href=\"%s\" rel=\"%s\" type=\"%s\" title=\"%s\">" }}
|
|
|
|
<title>{{ $url }}</title>
|
|
|
|
|
2022-11-19 17:06:22 +00:00
|
|
|
{{ (printf $link $url "canonical" "text/html" ($url | htmlEscape)) | safeHTML }}
|
2022-11-19 15:05:59 +00:00
|
|
|
</head>
|
|
|
|
</html>
|