From d6df16b22262b257ebe8f870581bf1975f5cbeca Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 20 Oct 2026 14:36:06 +0000 Subject: [PATCH] fix: omit zero lastmod dates from sitemap Generated reference pages without modification dates appeared in the sitemap with lastmod set to 0001-01-01. Only render lastmod when the page has a nonzero date. --- layouts/sitemap.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml index 0c8f565eff..9d56679e95 100644 --- a/layouts/sitemap.xml +++ b/layouts/sitemap.xml @@ -10,7 +10,9 @@ {{- if ne .Params.sitemap false }} {{ .Permalink}} + {{- if not .Lastmod.IsZero }} {{ .Lastmod | time.Format "2006-01-02" }} + {{- end }} monthly 0.5