From d1297cc531d7d3545f37d3a2ae196c31423b3567 Mon Sep 17 00:00:00 2001 From: Martin Pittermann Date: Sun, 22 May 2022 07:43:50 +0200 Subject: [PATCH] Add robotsNoIndex parameter (#900) - adds the ability to use the noindex and nofollow parameters for specific pages in production mode, preventing e.g. the imprint from showing up in search engines. - Usage: In post front-matter add, --- robotsNoIndex: true --- --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b921452564..b0e4787691 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,7 +1,7 @@ -{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }} {{- else }}