diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index ee7113db..4348d4c4 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,11 +1,18 @@ {{ $page := . }} -{{ $description := $page.Description }} +{{ $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") }} +{{ $language := site.LanguageCode | default site.Language.Lang }} {{ $limit := site.Config.Services.RSS.Limit }} +{{ $link := $page.Permalink }} +{{ $managingeditor := $page.Param "paige.feed.rss.managing_editor" }} {{ $pagetitle := $page.Title | markdownify | plainify }} {{ $sitetitle := site.Title | markdownify | plainify }} {{ $subpages := (cond $page.IsHome site $page).RegularPages }} {{ $title := "" }} +{{ $webmaster := $page.Param "paige.feed.rss.web_master" }} {{ if and $pagetitle $sitetitle }} {{ if $page.IsHome }} @@ -29,25 +36,25 @@ {{ printf `` ($page.Permalink | safeURL) | safeHTML }} - {{ with $page.AlternativeOutputFormats.Get "html" }} + {{ with $html }} {{ printf `` (.Permalink | safeURL) .MediaType | safeHTML }} {{ end }} - {{ with site.Copyright }} + {{ with $copyright }} {{ . }} {{ end }} - {{ with $description -}} {{- . -}} {{- else -}} Recent content {{- end }} - {{ with site.LanguageCode | default site.Language.Lang }} + {{ $description }} + {{ with $language }} {{ . }} {{ end }} - {{ if and $page.PublishDate (not $page.PublishDate.IsZero) }} - {{ $page.PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} + {{ with $lastbuilddate }} + {{ . }} {{ end }} - {{ $page.Permalink }} - {{ with $page.Param "paige.feed.rss.managing_editor" }} + {{ $link }} + {{ with $managingeditor }} {{ . }} {{ end }} {{ $title }} - {{ with $page.Param "paige.feed.rss.web_master" }} + {{ with $webmaster }} {{ . }} {{ end }} {{ $guids := dict }}