{{ $page := . }} {{ $authors := $page.Param "paige.feed.atom.authors" }} {{ $format := "2006-01-02T15:04:05Z07:00" }} {{ $html := $page.AlternativeOutputFormats.Get "html" }} {{ $icon := $page.Param "paige.feed.atom.icon" }} {{ $id := "" }} {{ $ids := dict }} {{ $language := site.LanguageCode | default site.Language.Lang }} {{ $limit := site.Config.Services.RSS.Limit }} {{ $logo := $page.Param "paige.feed.atom.logo" }} {{ $pagetitle := $page.Title | markdownify }} {{ $rights := site.Copyright | markdownify }} {{ $sitetitle := site.Title | markdownify }} {{ $subpages := slice }} {{ $subtitle := $page.Description | markdownify }} {{ $updated := site.LastChange.Format $format }} {{ if $icon }} {{ $icon = absLangURL $icon }} {{ end }} {{ if $page.Params.id }} {{ $id = printf "%s?id=%v" (urls.JoinPath site.BaseURL "/") $page.Params.id }} {{ else if not $page.Date.IsZero }} {{ $id = printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host ($page.Date.Format "2006-01-02") ($page.Date.Format $format) }} {{ else }} {{ $id = $page.Permalink }} {{ end }} {{ if $logo }} {{ $logo = absLangURL $logo }} {{ end }} {{ 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/list.atom.xml: page %s does not have a title" $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 }} {{ $updated }} {{ range $subpage := $subpages }} {{ $content := .Content }} {{ $id := "" }} {{ $paramlink := and .Params.link (not (.Param "paige.feed.link_to_page")) | not | not }} {{ $published := cond (not .PublishDate.IsZero) (.PublishDate.Format $format) "" }} {{ $rights := site.Copyright | markdownify }} {{ $summary := .Description | markdownify }} {{ $title := .Title | markdownify }} {{ $updated := .Lastmod.Format $format }} {{ $link := cond $paramlink .Params.link .Permalink }} {{ if and $content $paramlink }} {{ $link := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} {{ $footer := printf `

%s

` .Permalink (htmlEscape .Title) $link }} {{ $content = print $content $footer }} {{ end }} {{ if not $content }} {{ $content = .Description | markdownify}} {{ end }} {{ if .Params.id }} {{ $id = printf "%s?id=%v" (urls.JoinPath site.BaseURL "/") .Params.id }} {{ else if not .Date.IsZero }} {{ $id = printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.Date.Format "2006-01-02") (.Date.Format $format) }} {{ else }} {{ $id = .Permalink }} {{ end }} {{ with index $ids $id }} {{ warnf "layouts/_default/list.atom.xml: pages %s and %s have the same ID" . $subpage.RelPermalink }} {{ end }} {{ $ids = merge (dict $id .RelPermalink) $ids }} {{ if not $title }} {{ warnf "layouts/_default/list.atom.xml: page %s does not have a title" .RelPermalink }} {{ end }} {{ if .Lastmod.IsZero }} {{ warnf "layouts/_default/list.atom.xml: page %s does not have a modified date" .RelPermalink }} {{ end }} {{ with partial "paige/authors.html" . }} {{ range . }} {{ with .email }} {{ . }} {{ end }} {{ with .name }} {{ . }} {{ end }} {{ with .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 }} {{ $updated }}
{{ end }}