{{ $page := . }} {{ $copyright := site.Copyright | markdownify | plainify | htmlUnescape }} {{ $description := or $page.Description (i18n "paige_recent_content") }} {{ $format := "Mon, 02 Jan 2006 15:04:05 MST" }} {{ $language := site.LanguageCode | default site.Language.Lang }} {{ $lastbuilddate := false }} {{ $limit := site.Config.Services.RSS.Limit }} {{ $link := ($page.AlternativeOutputFormats.Get "html").Permalink }} {{ $managingeditor := $page.Param "paige.feed.rss.managing_editor" }} {{ $subpages := slice }} {{ $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.disable") }} {{ $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/list.rss.xml: Page %s does not have a title. The rss output requires a title. Either set the page's title parameter, or disable the rss output." $page.RelPermalink }} {{ end }} {{ printf "" | safeHTML }} {{ range $page.OutputFormats }} {{ $rel := .Rel }} {{ if eq .Permalink $page.Permalink }} {{ $rel = "self" }} {{ else if eq $rel "canonical" }} {{ $rel = "alternate" }} {{ end }} {{ if or (eq $rel "alternate") (eq $rel "enclosure") (eq $rel "related") (eq $rel "self") (eq $rel "via") }} {{ printf `` .Permalink $rel .MediaType | safeHTML }} {{ end }} {{ end }} {{ range $t := $page.Translations }} {{ range .OutputFormats }} {{ if or (eq .Rel "alternate") (eq .Rel "enclosure") (eq .Rel "related") (eq .Rel "via") }} {{ printf `` .Permalink $t.Lang .Rel .MediaType | safeHTML }} {{ end }} {{ end }} {{ end }} {{ 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/func-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.paige.author.email $primary.Params.paige.author.name }} {{ $author = printf "%s (%s)" $primary.Params.paige.author.email $primary.Params.paige.author.name }} {{ 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 | safeHTML }} {{ $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. The rss output requires a title or description. Either set the page's title or description parameters, or disable the rss output." .RelPermalink }} {{ end }} {{ with $author }} {{ . }} {{ end }} {{ with $description }} {{ printf "" . | safeHTML }} {{ end }} {{ $guid }} {{ with $link }} {{ . }} {{ end }} {{ with $pubdate }} {{ . }} {{ end }} {{ with $title }} {{ . }} {{ end }}
{{ end }}