From c6fafd9918dc5f92ace5de599cebb3f9ec39509e Mon Sep 17 00:00:00 2001 From: "roneo.org" Date: Thu, 31 Mar 2022 02:45:02 +0200 Subject: [PATCH] offTheRecord: exclude posts from the sitemap --- layouts/sitemap.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml index 7fdcc504..9f6c6ae1 100644 --- a/layouts/sitemap.xml +++ b/layouts/sitemap.xml @@ -4,7 +4,7 @@ {{ printf "" | safeHTML }} - {{ range .Data.Pages }} + {{ range .Data.Pages }}{{ if ne .Params.offTheRecord true }} {{ .Permalink }}{{ if not .Lastmod.IsZero }} {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} @@ -21,5 +21,5 @@ href="{{ .Permalink }}" />{{ end }} - {{ end }} + {{ end }}{{ end }} \ No newline at end of file