theme: announce alternative content in header #101

This commit is contained in:
Sören Weber 2021-09-23 22:38:54 +02:00
parent 3d0554124a
commit 44a03fe5a0
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -1,6 +1,10 @@
{{- partial "page-meta.go" . }} {{- partial "page-meta.go" . }}
{{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }} {{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }}
<meta name="robots" content="noindex, nofollow, noarchive, noimageindex"> <meta name="robots" content="noindex, nofollow, noarchive, noimageindex">
{{- else }}
{{- range .AlternativeOutputFormats }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end }}
{{- end }} {{- end }}
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"> <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{- with .Site.Params.author }} {{- with .Site.Params.author }}