Skip to content

Commit

Permalink
tpl: fix incorrect lastBuildDate
Browse files Browse the repository at this point in the history
Set the `<lastBuildDate>` field to be the most recent Lastmod date
of all the posts in the current selection.

Fixes #11600
  • Loading branch information
tastapod authored and bep committed Jan 25, 2024
1 parent 46f6187 commit f281ef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tpl/tplimpl/embedded/templates/_default/rss.xml
Expand Up @@ -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 }}
Expand Down

0 comments on commit f281ef8

Please sign in to comment.