commit 9e657da94add5061fdea5d510fe013f58fd64742
parent bf0dc1643bb70b256aa630b000b6c85a6e95cb7f
Author: Radek KozieĊ‚ <radoslaw.koziel@gmail.com>
Date:   Fri, 20 Jan 2023 19:08:30 +0100

Merge pull request #415 from florianbieser/FeatureNoindexAttribute

option to set an attribute noindex in front-matter for some sites
Diffstat:
Mlayouts/partials/head.html | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/layouts/partials/head.html b/layouts/partials/head.html @@ -3,6 +3,11 @@ <meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" /> <meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" /> <meta name="robots" content="noodp" /> +{{ if .Params.noindex }} + {{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }} + <meta name="robots" content="noindex" /> + {{ end }} +{{ end }} <link rel="canonical" href="{{ .Permalink }}" /> {{ template "_internal/google_analytics.html" . }}