Followup from topic 50340…
Do you have any idea, how to deal with hreflang links on paginator pages in a mulitlanguage setup?
Right now, I have this ugly workaround, which only works if there are the same number of pages across all languages:
{{ if .IsTranslated }}
{{/* TODO: Needs better solution! This workaround only works if there are the same number of pages across all languages */}}
{{ $page_indicator := "" }}
{{ with .Store.Get "paginator" }}
{{ if ne .PageNumber 1 }}
{{ $page_indicator = replace .URL page.RelPermalink "" }}
{{ end }}
{{ end }}
{{ with index .AllTranslations 0 }}
<link rel="alternate" hreflang="x-default" href="{{ .Permalink }}{{ $page_indicator }}" />
{{ end }}
{{ range .AllTranslations }}
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}{{ $page_indicator }}" />
{{ end }}
{{ end }}