head: add alternate pages

to indicate multiple language/locale versions
for multilungual sites
This commit is contained in:
Aditya Telange 2020-11-12 11:19:29 +05:30
parent b22520630d
commit d2f2fa6cc6
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -37,6 +37,9 @@
{{- range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
{{- range .Translations -}}
<link rel="alternate" hreflang="{{- .Lang -}}" href="{{- .Permalink -}}" />
{{ end }}
{{- partial "extend_head.html" . -}}
<!-- Misc -->
{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}