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

github.com/ojroques/hugo-researcher.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriele Bozzola <sbozzolator@gmail.com>2022-10-10 04:12:14 +0300
committerGabriele Bozzola <sbozzolator@gmail.com>2022-10-10 04:12:14 +0300
commitca7f3c18578d84e2811916dc6b5ebbe831df654c (patch)
treeed9f3a2fdcf24483f1d737e4424b528e99a6ef2f
parentbd335ad38c469f448270dc99b338768ef1765e69 (diff)
Add option to ask crawlers to not index a page
With this commit, pages can be marked as "noindex" to avoid indexing from search engines. To activate this tag on a give page, the option `noindex` has to be set true at the beginning on the markdown file, as in: ``` +++ title = "Example" noindex = true +++ ```
-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 b4c5357..f01e36b 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -25,4 +25,8 @@
{{ if not .Site.IsServer }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
+
+ {{ if .Params.noindex }}
+ <meta name="robots" content="noindex">
+ {{ end }}
</head>