hide hidden page from search engines #124

This commit is contained in:
Dmitry Kolosov 2021-12-27 20:18:00 +03:00
parent 36f693a61c
commit 68892b834f

View File

@ -7,6 +7,10 @@
{{ partial "title.html" . }}
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}">
{{ if and (.IsPage) (eq .Params.hidden true)}}
<meta name="robots" content="noindex" />
{{ end }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}