mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
Merge pull request #1 from dogweather/dogweather-hreflang
Add hreflang links to HTML HEAD
This commit is contained in:
commit
49cd419e6e
@ -7,6 +7,19 @@
|
|||||||
<title>{{ block "title" . }}{{ with .Params.Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ block "title" . }}{{ with .Params.Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||||
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
||||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Multilingual site support
|
||||||
|
See: https://developers.google.com/search/docs/specialty/international/localized-versions
|
||||||
|
*/}}
|
||||||
|
{{ with .AllTranslations }}
|
||||||
|
{{ range . }}
|
||||||
|
{{ if not (eq .Lang $.Page.Lang) }}
|
||||||
|
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}">
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ hugo.Generator }}
|
{{ hugo.Generator }}
|
||||||
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
|
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
|
||||||
{{ $production := eq (getenv "HUGO_ENV") "production" | or (eq site.Params.env "production") }}
|
{{ $production := eq (getenv "HUGO_ENV") "production" | or (eq site.Params.env "production") }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user