Skip to content

Commit

Permalink
head: add alternate pages
Browse files Browse the repository at this point in the history
to indicate multiple language/locale versions
for multilungual sites
  • Loading branch information
adityatelange committed Nov 12, 2020
1 parent b225206 commit d2f2fa6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -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") }}
Expand Down

0 comments on commit d2f2fa6

Please sign in to comment.