commit 3d894d14be2bb199f17f585babf0da3cfbfd8a4f
parent e06649f8c8ad97548e6085a8f3effffcc349e58a
Author: Florian <26717601+florianbieser@users.noreply.github.com>
Date: Thu, 19 Jan 2023 17:07:38 +0100
correct behaviour even if boolean is written as string
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
@@ -4,7 +4,9 @@
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
<meta name="robots" content="noodp" />
{{ if .Params.noindex }}
-<meta name="robots" content="noindex" />
+ {{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }}
+ <meta name="robots" content="noindex" />
+ {{ end }}
{{ end }}
<link rel="canonical" href="{{ .Permalink }}" />