Changed from deprecated .Site.LanguageCode to .Site.Language.Locale

This commit is contained in:
Robert Randall
2026-04-29 13:32:56 +02:00
parent da8ca782aa
commit 350458a3c5
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator> <generator>Hugo -- gohugo.io</generator>
<language>{{ site.LanguageCode }}</language>{{ with .Site.Params.Author.email }} <language>{{ site.Language.Locale }}</language>{{ with .Site.Params.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }} <managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}} <webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
{{ if .Site.Params.footer.showCopyright | default true -}} {{ if .Site.Params.footer.showCopyright | default true -}}
+1 -1
View File
@@ -15,7 +15,7 @@
/>{{ end }} />{{ end }}
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="{{ .Language.LanguageCode }}" hreflang="{{ .Language.Locale }}"
href="{{ $link }}" href="{{ $link }}"
/>{{ end }} />{{ end }}
</url> </url>
+1 -1
View File
@@ -32,7 +32,7 @@
<link rel="canonical" href="{{ .Permalink }}"> <link rel="canonical" href="{{ .Permalink }}">
{{ if .IsTranslated }} {{ if .IsTranslated }}
{{ range .AllTranslations }} {{ range .AllTranslations }}
{{ $hreflang := .Language.LanguageCode | default .Language.Lang }} {{ $hreflang := .Language.Locale | default .Language.Lang }}
{{ if $hreflang }} {{ if $hreflang }}
<link rel="alternate" hreflang="{{ $hreflang }}" href="{{ .Permalink }}"> <link rel="alternate" hreflang="{{ $hreflang }}" href="{{ .Permalink }}">
{{ end }} {{ end }}