From 44f6efbadd76ab14841249c05864c34d5fbbdfdb Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Fri, 28 Jun 2024 14:24:35 -0700 Subject: [PATCH] tpl/tplimpl: Fall back from publish date to date in RSS template Improves #12438 --- 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 2e505f1bc56..2d58f07f1cb 100644 --- a/tpl/tplimpl/embedded/templates/_default/rss.xml +++ b/tpl/tplimpl/embedded/templates/_default/rss.xml @@ -61,7 +61,7 @@ {{ .Title }} {{ .Permalink }} - {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ (or .PublishDate .Date).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} {{ .Permalink }} {{ .Summary | transform.XMLEscape | safeHTML }}