hidden pages: hide search index #102

if user disabled SEO or search
This commit is contained in:
Sören Weber 2021-09-27 20:06:39 +02:00
parent 5d98f7d31f
commit 7f0057bcd9
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -3,8 +3,17 @@
<meta name="robots" content="noindex, nofollow, noarchive, noimageindex"> <meta name="robots" content="noindex, nofollow, noarchive, noimageindex">
{{- else }} {{- else }}
{{- range .AlternativeOutputFormats }} {{- range .AlternativeOutputFormats }}
{{- if ne .Name "JSON" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end }} {{- end }}
{{- end }}
{{- end }}
{{- if and (ne .Site.Params.disableSeoHiddenPages true) (ne .Site.Params.disableSearchHiddenPages true) }}
{{- range .AlternativeOutputFormats }}
{{- if eq .Name "JSON" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end }}
{{- 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 }}