From 79419192d7ced7b80c56e8130d75549df7cebf5d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 9 Sep 2024 11:35:00 +0000 Subject: [PATCH] [Feature Request #81]: Added support for customizable noindex Signed-off-by: GitHub Action --- hugo.toml.example | 6 ++++++ layouts/partials/site-meta.html | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hugo.toml.example b/hugo.toml.example index bfd95be..2ce5143 100644 --- a/hugo.toml.example +++ b/hugo.toml.example @@ -113,6 +113,12 @@ expiryDate = ["expiryDate"] # descriptionInPosts= true # initialPublish = "Initally Posted on: " # human = ["single","posts"] + # revisitAfter = "15 days" + # noIndex = false + # denyRobots = "noindex, nofollow, noarchive" + # allowRobots = "index, follow" + # noIndex = false + [[params.socialLinks]] name = "mastodon" diff --git a/layouts/partials/site-meta.html b/layouts/partials/site-meta.html index 190bde6..b3561cd 100644 --- a/layouts/partials/site-meta.html +++ b/layouts/partials/site-meta.html @@ -2,11 +2,10 @@ -{{- if (not (in .Page.RelPermalink "404")) -}} - - +{{- if (or (in .Page.RelPermalink "404") (or .Site.Params.noIndex .Params.noIndex)) -}} + {{- else -}} - + {{- end -}}