Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Mitrichius/hugo-theme-anubis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kolosov <mitrichius@gmail.com>2021-12-27 20:18:00 +0300
committerDmitry Kolosov <mitrichius@gmail.com>2021-12-27 20:18:00 +0300
commit68892b834f0e4feb403c8505324896eb344ceab5 (patch)
treea72444500dbdebe725173dac27a139b6e18615d5 /layouts/partials/head.html
parent36f693a61cfb1fc9b113ee294f9ea9ee3e872cf2 (diff)
hide hidden page from search engines #124hidden-param/124
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r--layouts/partials/head.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 6fd87a9..e882d5d 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -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 -}}