From 60c274b513d2b1be8d31837ba7de2e8088db121a Mon Sep 17 00:00:00 2001 From: Daniel Terhorst-North Date: Mon, 30 Oct 2023 16:56:52 +0000 Subject: [PATCH] tpl: fix incorrect lastBuildDate Set the `` field to be the most recent Lastmod date of all the posts in the current selection. Fixes #11600 --- tpl/tplimpl/embedded/templates/_default/rss.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/tplimpl/embedded/templates/_default/rss.xml b/tpl/tplimpl/embedded/templates/_default/rss.xml index 12756e78107..750db8804a2 100644 --- a/tpl/tplimpl/embedded/templates/_default/rss.xml +++ b/tpl/tplimpl/embedded/templates/_default/rss.xml @@ -43,7 +43,7 @@ {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} {{ . }}{{ end }}{{ if not .Date.IsZero }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ (index $pages.ByLastmod.Reverse 0).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" }} {{ printf "" .Permalink .MediaType | safeHTML }} {{- end }}