Change RSS lastBuildDate to use section dates
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{{ $copyright := site.Copyright }}
|
||||
{{ $description := or $page.Description "Recent content" }}
|
||||
{{ $html := $page.AlternativeOutputFormats.Get "html" }}
|
||||
{{ $lastbuilddate := and $page.PublishDate (not $page.PublishDate.IsZero) ($page.PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700") }}
|
||||
{{ $lastbuilddate := (partial "paige/changed.html" $page).Format "Mon, 02 Jan 2006 15:04:05 -0700" }}
|
||||
{{ $language := site.LanguageCode | default site.Language.Lang }}
|
||||
{{ $limit := site.Config.Services.RSS.Limit }}
|
||||
{{ $link := $page.Permalink }}
|
||||
|
8
layouts/partials/paige/changed.html
Normal file
8
layouts/partials/paige/changed.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ $page := . }}
|
||||
{{ $max := "" }}
|
||||
{{ range $page.RegularPages }}
|
||||
{{ if or (not $max) (lt $max .PublishDate) }}
|
||||
{{ $max = .PublishDate }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ return $max }}
|
Reference in New Issue
Block a user