Use .LanguageCode in place of .Lang when avalible for all lang and hreflang attributes.

This commit is contained in:
Fredrik Jonsson 2020-11-13 13:41:07 +01:00
commit d3eb48fee5

View file

@ -19,7 +19,7 @@
<link rel="canonical" href="{{ .Permalink }}">
{{ if .IsTranslated -}}
{{ range .Translations }}
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .RelPermalink }}">
<link rel="alternate" hreflang="{{ .Language.Params.LanguageCode | default .Lang }}" href="{{ .RelPermalink }}">
{{ end -}}
{{ end -}}
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | relURL }}">