mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-08 01:22:29 +00:00
Switch themes to minimo
This commit is contained in:
20
themes/minimo/layouts/partials/head/hreflang.html
Normal file
20
themes/minimo/layouts/partials/head/hreflang.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- define "hreflang_x" -}}
|
||||
<link rel='alternate' hreflang='{{ .Lang }}' href='{{ .Permalink }}'>
|
||||
{{- end -}}
|
||||
|
||||
{{- define "hreflang_x_default" -}}
|
||||
{{- if eq .Lang ( index .Site.Languages 0 ).Lang -}}
|
||||
<link rel='alternate' hreflang='x-default' href='{{ .Permalink }}'>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .IsTranslated -}}
|
||||
|
||||
{{- template "hreflang_x" . -}}
|
||||
{{- template "hreflang_x_default" . -}}
|
||||
{{- range .Translations -}}
|
||||
{{- template "hreflang_x" . -}}
|
||||
{{- template "hreflang_x_default" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}
|
Reference in New Issue
Block a user