summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Terhorst-North <daniel@dannorth.net>2023-10-30 16:56:52 +0000
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-01-25 19:46:52 +0100
commitf281ef8a4af27b7ab789d25c29751b4a7bd8b34e (patch)
tree4ca1536f0cabb13b969268371dcd0c67c6be23cb
parent46f618756f294d4eba7601c842b9926d006e9f9d (diff)
tpl: fix incorrect lastBuildDate
Set the `<lastBuildDate>` field to be the most recent Lastmod date of all the posts in the current selection. Fixes #11600
-rw-r--r--tpl/tplimpl/embedded/templates/_default/rss.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/tplimpl/embedded/templates/_default/rss.xml b/tpl/tplimpl/embedded/templates/_default/rss.xml
index 6818d31ec..c997be31c 100644
--- a/tpl/tplimpl/embedded/templates/_default/rss.xml
+++ b/tpl/tplimpl/embedded/templates/_default/rss.xml
@@ -53,7 +53,7 @@
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
- <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
+ <lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}