{{ $page := . }} {{ $limit := site.Config.Services.RSS.Limit }} {{ $pages := (cond $page.IsHome site $page).RegularPages }} {{ $title := partial "paige/title.html" $page }} {{ $pages = where $pages "Params.paige.feed.hide_page" "ne" true }} {{ if ge $limit 0 }} {{ $pages = $pages | first $limit }} {{ end }} {{ printf "" | safeHTML }} {{ printf `` ($page.Permalink | safeURL) | safeHTML }} {{ with $page.AlternativeOutputFormats.Get "html" }} {{ printf `` (.Permalink | safeURL) .MediaType | safeHTML }} {{ end }} {{ with site.Copyright }} {{ . }} {{ end }} {{ with $title -}} {{- . -}} {{- else -}} Recent content {{- end }} {{ with site.LanguageCode | default site.Language.Lang }} {{ . }} {{ end }} {{ if and $page.PublishDate (not $page.PublishDate.IsZero) }} {{ $page.PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} {{ end }} {{ $page.Permalink }} {{ with $page.Param "paige.feed.rss.managing_editor_email" }} {{ . }} {{ end }} {{ with $title }} {{ . }} {{ end }} {{ with $page.Param "paige.feed.rss.web_master_email" }} {{ . }} {{ end }} {{ range $pages }} {{ with partial "paige/authors.html" . }} {{ $authors := slice }} {{ range . }} {{ $authors = $authors | append .name }} {{ end }} {{ delimit $authors ", " }} {{ end }} {{ if .Content }} {{ printf "" .Content | safeHTML }} {{ else if .Description }} {{ printf "" (.Description | markdownify) | safeHTML }} {{ end }} {{ $guid := "" }} {{ $permalink := false }} {{ if .Params.id }} {{ $guid = .Params.id }} {{ else if not .Date.IsZero }} {{ $guid = printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.Date.Format "2006-01-02") (.Date.Format "2006-01-02T15:04:05Z07:00") }} {{ else }} {{ $guid = .RelPermalink }} {{ $permalink = false }} {{ end }} {{ $guid }} {{ if and .Params.link (not (.Param "paige.feed.atom.link_to_page")) }} {{ .Params.link | safeURL }} {{ else }} {{ .Permalink | safeURL }} {{ end }} {{ with .PublishDate }} {{ .Format "Mon, 02 Jan 2006 15:04:05 -0700" }} {{ end }} {{ with .Title }} {{ . | markdownify | plainify | htmlUnescape | safeHTML }} {{ end }} {{ if and (not .Description) (not .Title) }} {{ warnf "layouts/_default/rss.xml: Page %s does not have a title or description" .RelPermalink }} {{ end }} {{ end }}