{{ $page := . }} {{ $copyright := site.Copyright }} {{ $description := or $page.Description "Recent content" }} {{ $feed := ($page.OutputFormats.Get "rss").Permalink }} {{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }} {{ $guids := dict }} {{ $html := $page.AlternativeOutputFormats.Get "html" }} {{ $language := site.LanguageCode | default site.Language.Lang }} {{ $lastbuilddate := (partial "paige/changed.html" $page).Format $format }} {{ $limit := site.Config.Services.RSS.Limit }} {{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }} {{ $managingeditor := $page.Param "paige.feed.rss.managing_editor" }} {{ $pagetitle := $page.Title | markdownify | plainify | htmlUnescape }} {{ $sitetitle := site.Title | markdownify | plainify | htmlUnescape }} {{ $subpages := slice }} {{ $webmaster := $page.Param "paige.feed.rss.web_master" }} {{ range (cond $page.IsHome site $page).RegularPages }} {{ if not (.Param "paige.feed.hide_page") }} {{ $subpages = $subpages | append . }} {{ end }} {{ end }} {{ if gt $limit 0 }} {{ $subpages = $subpages | first $limit }} {{ end }} {{ $titles := slice ($page.Title | markdownify) }} {{ range .Ancestors }} {{ $titles = $titles | append (.Title | markdownify) }} {{ end }} {{ $title := delimit $titles " · " }} {{ if not $title }} {{ warnf "layouts/_default/rss.xml: page %s does not have a title" $page.RelPermalink }} {{ end }} {{ printf "" | safeHTML }} {{ with $copyright }} {{ . }} {{ end }} {{ $description }} {{ with $language }} {{ . }} {{ end }} {{ with $lastbuilddate }} {{ . }} {{ end }} {{ $link }} {{ with $managingeditor }} {{ . }} {{ end }} {{ $title }} {{ with $webmaster }} {{ . }} {{ end }} {{ range $subpage := $subpages }} {{ $author := "" }} {{ $authors := partial "paige/authors.html" . }} {{ $description := .Content }} {{ $guid := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") (cond (.Params.id | not) .RelPermalink .Params.id) }} {{ $paramlink := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }} {{ $pubdate := .PublishDate.Format $format }} {{ $title := .Title | markdownify | plainify | htmlUnescape }} {{ $link := cond $paramlink .Params.link .Permalink }} {{ with $authors }} {{ $primary := index . 0 }} {{ if and $primary.Params.email $primary.Title }} {{ $author = printf "%s (%s)" $primary.Params.email $primary.Title }} {{ else if $primary.Params.email }} {{ $author = $primary.Params.email }} {{ end }} {{ end }} {{ if and $description $paramlink }} {{ $pagelink := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} {{ $footer := printf `

%s

` .Permalink (htmlEscape $title) $pagelink }} {{ $description = print $description $footer }} {{ end }} {{ if not $description }} {{ $description = .Description | markdownify}} {{ end }} {{ $description = $description | replaceRE `` (printf `` .Permalink) }} {{ $description = $description | replaceRE `` (printf `` .Permalink) }} {{ if and (not $description) (not $title) }} {{ warnf "layouts/_default/rss.xml: page %s does not have a title or description" .RelPermalink }} {{ end }} {{ with index $guids $guid }} {{ warnf "layouts/_default/rss.xml: pages %s and %s have the same GUID" . $subpage.RelPermalink }} {{ end }} {{ $guids = merge (dict $guid .RelPermalink) $guids }} {{ with $author }} {{ . }} {{ end }} {{ with $description }} {{ printf "" . | safeHTML }} {{ end }} {{ $guid }} {{ with $link }} {{ . }} {{ end }} {{ with $pubdate }} {{ . }} {{ end }} {{ with $title }} {{ . }} {{ end }}
{{ end }}