diff --git a/layouts/_default/list.rss.xml b/layouts/_default/list.rss.xml index df2cb5d7..bb4b9431 100644 --- a/layouts/_default/list.rss.xml +++ b/layouts/_default/list.rss.xml @@ -4,7 +4,7 @@ {{ $description := or $page.Description "Recent content" }} {{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }} {{ $language := site.LanguageCode | default site.Language.Lang }} -{{ $lastbuilddate := (partial "paige/changed.html" $page).Format $format }} +{{ $lastbuilddate := false }} {{ $limit := site.Config.Services.RSS.Limit }} {{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }} {{ $managingeditor := $page.Param "paige.feed.rss.managing_editor" }} @@ -12,6 +12,10 @@ {{ $webmaster := $page.Param "paige.feed.rss.web_master" }} {{ range $page.RegularPagesRecursive.ByPublishDate.Reverse }} + {{ if or (and (not $lastbuilddate) (not .Lastmod.IsZero)) (and $lastbuilddate (lt $lastbuilddate .Lastmod)) }} + {{ $lastbuilddate = .Lastmod }} + {{ end }} + {{ if not (.Param "paige.feed.hide_page") }} {{ $subpages = $subpages | append . }} {{ end }} diff --git a/layouts/partials/paige/changed.html b/layouts/partials/paige/changed.html deleted file mode 100644 index c7e6e7da..00000000 --- a/layouts/partials/paige/changed.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ $page := . }} -{{ $max := "" }} - -{{ range $page.RegularPages }} - {{ if or (not $max) (lt $max .Lastmod) }} - {{ $max = .Lastmod }} - {{ end }} -{{ end }} - -{{ if not $max }} - {{ $max = $page.Lastmod }} -{{ end }} - -{{ return $max }}