From e06649f8c8ad97548e6085a8f3effffcc349e58a Mon Sep 17 00:00:00 2001
From: Florian <26717601+florianbieser@users.noreply.github.com>
Date: Wed, 18 Jan 2023 16:55:33 +0100
Subject: [PATCH 1/2] option to set an attribute noindex in front-matter for
some sites
---
layouts/partials/head.html | 3 +++
1 file changed, 3 insertions(+)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index bb214f3..dc2844f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -3,6 +3,9 @@
+{{ if .Params.noindex }}
+
+{{ end }}
{{ template "_internal/google_analytics.html" . }}
From 3d894d14be2bb199f17f585babf0da3cfbfd8a4f Mon Sep 17 00:00:00 2001
From: Florian <26717601+florianbieser@users.noreply.github.com>
Date: Thu, 19 Jan 2023 17:07:38 +0100
Subject: [PATCH 2/2] correct behaviour even if boolean is written as string
---
layouts/partials/head.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index dc2844f..5a4f31e 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -4,7 +4,9 @@
{{ if .Params.noindex }}
-
+ {{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }}
+
+ {{ end }}
{{ end }}