From a5ee40adb7d5530e6b2a912348910cbc743c163b Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Mon, 26 Aug 2024 08:39:50 +0200 Subject: [PATCH] rss: add an updated date - Adds an uptdated date to the item feed. Co-Authored-by: iGor milhit --- layouts/_default/rss.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index f1f1c2a..1d1794b 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -30,6 +30,9 @@ {{ .Title }} {{ .Permalink }} {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ if (and (isset .Params "lastmod") (gt (dateFormat "2006-01-02" (.Lastmod)) (dateFormat "2006-01-02" (.PublishDate)))) }} + {{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ end }} {{ with .Site.Params.author.email }}{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{ .Content | html }}