diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2023-05-27 15:04:51 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-30 20:10:16 +0200 |
commit | ff77a927f9c032f5a65eff2daf1f7f8c04103711 (patch) | |
tree | 2c005de46d81aa98573cdc076aa6617b0d954571 /tpl | |
parent | 9cdca1f9582597c3998e44cd16509ead362a90df (diff) |
tpl/tplimpl: Use .Language.LanguageCode in built-in templates
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/tplimpl/embedded/templates/_default/rss.xml | 4 | ||||
-rw-r--r-- | tpl/tplimpl/embedded/templates/_default/sitemap.xml | 4 | ||||
-rw-r--r-- | tpl/tplimpl/embedded/templates/alias.html | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tpl/tplimpl/embedded/templates/_default/rss.xml b/tpl/tplimpl/embedded/templates/_default/rss.xml index 7acdbef6b..4bdd844b3 100644 --- a/tpl/tplimpl/embedded/templates/_default/rss.xml +++ b/tpl/tplimpl/embedded/templates/_default/rss.xml @@ -16,8 +16,8 @@ <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> <link>{{ .Permalink }}</link> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> - <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} - <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} + <generator>Hugo -- gohugo.io</generator> + <language>{{ site.Language.LanguageCode }}</language>{{ with .Site.Author.email }} <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} diff --git a/tpl/tplimpl/embedded/templates/_default/sitemap.xml b/tpl/tplimpl/embedded/templates/_default/sitemap.xml index cdb3748e8..b1e4b2d2d 100644 --- a/tpl/tplimpl/embedded/templates/_default/sitemap.xml +++ b/tpl/tplimpl/embedded/templates/_default/sitemap.xml @@ -10,12 +10,12 @@ <priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }} <xhtml:link rel="alternate" - hreflang="{{ .Language.Lang }}" + hreflang="{{ .Language.LanguageCode }}" href="{{ .Permalink }}" />{{ end }} <xhtml:link rel="alternate" - hreflang="{{ .Language.Lang }}" + hreflang="{{ .Language.LanguageCode }}" href="{{ .Permalink }}" />{{ end }} </url> diff --git a/tpl/tplimpl/embedded/templates/alias.html b/tpl/tplimpl/embedded/templates/alias.html index 8448760fa..43d177eaa 100644 --- a/tpl/tplimpl/embedded/templates/alias.html +++ b/tpl/tplimpl/embedded/templates/alias.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html{{ with site.LanguageCode | default site.Language.Lang }} lang="{{ . }}"{{ end }}> +<html lang="{{ site.Language.LanguageCode }}"> <head> <title>{{ .Permalink }}</title> <link rel="canonical" href="{{ .Permalink }}"> |