{{ $page := . }} {{ $authors := $page.Param "paige.feed.atom.authors" }} {{ $lang := site.LanguageCode | default site.Language.Lang }} {{ $limit := site.Config.Services.RSS.Limit }} {{ $pagetitle := $page.Title | markdownify }} {{ $rights := site.Copyright }} {{ $sitetitle := site.Title | markdownify }} {{ $subpages := (cond $page.IsHome site $page).RegularPages }} {{ $subtitle := $page.Description }} {{ $title := "" }} {{ $updated := time site.LastChange }} {{ if and $pagetitle $sitetitle }} {{ if $page.IsHome }} {{ $title = $pagetitle | safeHTML }} {{ else }} {{ $title = printf "%s · %s" $pagetitle $sitetitle | safeHTML }} {{ end }} {{ else if $pagetitle }} {{ $title = $pagetitle | safeHTML }} {{ else if $sitetitle }} {{ $title = $sitetitle | safeHTML }} {{ end }} {{ $subpages = where $subpages "Params.paige.feed.hide_page" "ne" true }} {{ if ge $limit 0 }} {{ $subpages = $subpages | first $limit }} {{ end }} {{ printf "" | safeHTML }} {{ range $authors }} {{ with .email }} {{ . }} {{ end }} {{ with .name }} {{ . }} {{ end }} {{ with .url }} {{ . }} {{ end }} {{ end }} {{ $id := "" }} {{ if .Params.id }} {{ $id = .Params.id }} {{ else if not $page.Date.IsZero }} {{ $id = printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.Date.Format "2006-01-02") (.Date.Format "2006-01-02T15:04:05Z07:00") }} {{ else }} {{ $id = .Permalink }} {{ end }} {{ $id }} {{ printf `` ($page.Permalink | safeURL) | safeHTML }} {{ range $page.AlternativeOutputFormats }} {{ if eq .Rel "alternate" }} {{ printf `` (.Permalink | safeURL) .MediaType | safeHTML }} {{ end }} {{ end }} {{ range $t := $page.Translations }} {{ range .OutputFormats }} {{ if eq .Rel "alternate" }} {{ printf `` (.Permalink | safeURL) $t.Lang .MediaType | safeHTML }} {{ end }} {{ end }} {{ end }} {{ with $rights }} {{ printf "" (. | markdownify) | safeHTML }} {{ end }} {{ with $subtitle }} {{ printf "" (. | markdownify) | safeHTML}} {{ end }} {{ if not $title }} {{ warnf "layouts/_default/list.atom.xml: Page %s does not have a title" $page.RelPermalink }} {{ end }} {{ printf `<![CDATA[%s]]>` ($title | markdownify) | safeHTML }} {{ $updated.Format "2006-01-02T15:04:05Z07:00" }} {{ $ids := dict }} {{ range $subpage := $subpages }} {{ with partial "paige/authors.html" . }} {{ range . }} {{ with .email }} {{ . }} {{ end }} {{ with .name }} {{ . }} {{ end }} {{ with .url }} {{ . }} {{ end }} {{ end }} {{ end }} {{ $content := .Content }} {{ if $content }} {{ if and .Params.link (not (.Param "paige.feed.atom.link_to_page")) }} {{ $link := or (.Param "paige.feed.atom.page_link" | markdownify) "⏎" }} {{ $footer := printf `

%s

` .Permalink .Title $link }} {{ $content = print $content $footer }} {{ end }} {{ printf "" $content | safeHTML }} {{ end }} {{ $id := "" }} {{ if .Params.id }} {{ $id = .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 "2006-01-02T15:04:05Z07:00") }} {{ else }} {{ $id = .RelPermalink }} {{ 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 }} {{ $id }} {{ range .OutputFormats }} {{ if eq .Rel "alternate" }} {{ printf `` (.Permalink | safeURL) .MediaType | safeHTML }} {{ end }} {{ end }} {{ range $t := .Translations }} {{ range .OutputFormats }} {{ if eq .Rel "alternate" }} {{ printf `` (.Permalink | safeURL) $t.Lang .MediaType | safeHTML }} {{ end }} {{ end }} {{ end }} {{ if and .Params.link (not (.Param "paige.feed.atom.link_to_page")) }} {{ else }} {{ end }} {{ if not .PublishDate.IsZero }} {{ .PublishDate.Format "2006-01-02T15:04:05Z07:00" }} {{ end }} {{ with site.Copyright }} {{ printf "" (. | markdownify) | safeHTML }} {{ end }} {{ with .Description }} {{ printf "" (. | markdownify) | safeHTML }} {{ end }} {{ if not .Title }} {{ warnf "layouts/_default/list.atom.xml: %s: Page %s does not have a title" .RelPermalink }} {{ end }} {{ printf `<![CDATA[%s]]>` (.Title | markdownify) | safeHTML }} {{ if .Lastmod.IsZero }} {{ warnf "layouts/_default/list.atom.xml: Page %s does not have a modified date" .RelPermalink }} {{ end }} {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}
{{ end }}