{{ $page := . }} {{ $authors := $page.Param "paige.feeds.atom.authors" }} {{ $date := "2006-01-02T15:04:05Z07:00" }} {{ $icon := $page.Param "paige.feeds.atom.icon" | absLangURL }} {{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }} {{ $language := site.LanguageCode | default site.Language.Lang }} {{ $limit := site.Config.Services.RSS.Limit }} {{ $logo := $page.Param "paige.feeds.atom.logo" | absLangURL }} {{ $rights := site.Copyright | markdownify }} {{ $subpages := $page.RegularPagesRecursive.ByPublishDate }} {{ $subtitle := $page.Description | markdownify }} {{ $lastmod := site.Lastmod.Format $date }} {{ if gt $limit 0 }} {{ $subpages = first $limit $subpages }} {{ end }} {{ $titles := slice (markdownify $page.Title) }} {{ range .Ancestors }} {{ $titles = $titles | append (markdownify .Title) }} {{ end }} {{ $title := delimit $titles " · " }} {{ if not $title }} {{ warnf "layouts/_default/list.atom.xml: Page %s does not have a title. The atom output requires a title. Either set the page's title parameter, or disable the atom output." $page.RelPermalink }} {{ end }} {{ printf "" | safeHTML }} {{ range $authors }} {{ with .email }} {{ . }} {{ end }} {{ with .name }} {{ . }} {{ end }} {{ with .url }} {{ . }} {{ end }} {{ end }} {{ with $icon }} {{ . }} {{ end }} {{ $id }} {{ 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 $logo }} {{ . }} {{ end }} {{ with $rights }} {{ printf "" . | safeHTML }} {{ end }} {{ with $subtitle }} {{ printf "" . | safeHTML }} {{ end }} {{ printf `<![CDATA[%s]]>` $title | safeHTML }} {{ $lastmod }} {{ range $subpages }} {{ if not (.Param "paige.exclude_feeds") }} {{ $content := .Content }} {{ $external := and .Params.link (not (.Param "paige.feeds.disable_link")) | not | not }} {{ $id := printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.PublishDate.Format "2006-01-02") .RelPermalink }} {{ $lastmod := .Lastmod.Format $date }} {{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $date) "" }} {{ $summary := markdownify .Description }} {{ $title := markdownify .Title }} {{ $link := cond $external .Params.link .Permalink }} {{ if and $content $external }} {{ $text := or (.Param "paige.feeds.page_link" | markdownify) "⏎" }} {{ $footer := printf `

%s

` .Permalink (htmlEscape .Title) $text | safeHTML }} {{ $content = print $content $footer }} {{ end }} {{ if not $content }} {{ $content = markdownify .Description }} {{ end }} {{ if not $title }} {{ warnf "layouts/_default/list.atom.xml: Page %s does not have a title. The atom output requires a title. Either set the page's title parameter, or disable the atom output." .RelPermalink }} {{ end }} {{ if .Lastmod.IsZero }} {{ warnf "layouts/_default/list.atom.xml: Page %s does not have a modified date. The atom output requires a modified date. Either set the page's date parameter, or set the page's paige.feeds.exclude parameter to true, or disable the atom output." .RelPermalink }} {{ end }} {{ with partial "paige/func-authors.html" . }} {{ range . }} {{ with .Params.paige.author.email }} {{ . }} {{ end }} {{ with .Params.paige.author.name }} {{ . }} {{ end }} {{ with .Params.paige.author.url }} {{ . }} {{ end }} {{ end }} {{ end }} {{ with $content }} {{ printf "" . | safeHTML }} {{ end }} {{ $id }} {{ range .OutputFormats }} {{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }} {{ if or (eq $rel "alternate") (eq $rel "enclosure") (eq $rel "related") (eq $rel "via") }} {{ $href := cond (and (eq $rel "alternate") (eq .MediaType.Type "text/html")) $link .Permalink }} {{ end }} {{ end }} {{ range $t := .Translations }} {{ range .OutputFormats }} {{ if or (eq .Rel "alternate") (eq .Rel "enclosure") (eq .Rel "related") (eq .Rel "via") }} {{ end }} {{ end }} {{ end }} {{ with $published }} {{ . }} {{ end }} {{ with $rights }} {{ printf "" . | safeHTML }} {{ end }} {{ with $summary }} {{ printf "" . | safeHTML }} {{ end }} {{ printf `<![CDATA[%s]]>` $title | safeHTML }} {{ $lastmod }}
{{ end }} {{ end }}