From a184c53610328779e8df324c0c64b5cf2526178c Mon Sep 17 00:00:00 2001 From: Daniel Terhorst-North Date: Sat, 10 Feb 2024 13:24:02 +0530 Subject: [PATCH] [PATCH] tpl/tplimpl: Fix incorrect lastBuildDate cherry-pick from https://github.com/gohugoio/hugo/commit/87bf2b9688cbcfdb9b7aab00ce9e54095b56a47b Co-authored-by: Joe Mooring --- layouts/_default/rss.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 342986d..89dec2c 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -60,7 +60,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).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" }} {{ printf "" .Permalink .MediaType | safeHTML }} {{- end }}