You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.9 KiB
XML
72 lines
2.9 KiB
XML
{{ $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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
<channel>
|
|
{{ printf `<atom:link href="%s" rel="self" type="application/rss+xml"/>` ($page.Permalink | safeURL) | safeHTML }}
|
|
{{ range $page.AlternativeOutputFormats }}
|
|
{{ if eq .Rel "alternate" }}
|
|
{{ printf `<atom:link href="%s" rel="alternate" type="%s"/>` (.Permalink | safeURL) .MediaType | safeHTML }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ with site.Copyright }}
|
|
<copyright>{{ . }}</copyright>
|
|
{{ end }}
|
|
<description>{{ with $title -}} {{- . -}} {{- else -}} Recent content {{- end }}</description>
|
|
{{ with site.LanguageCode | default site.Language.Lang }}
|
|
<language>{{ . }}</language>
|
|
{{ end }}
|
|
{{ if and $page.PublishDate (not $page.PublishDate.IsZero) }}
|
|
<lastBuildDate>{{ $page.PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</lastBuildDate>
|
|
{{ end }}
|
|
<link>{{ $page.Permalink }}</link>
|
|
{{ with $page.Param "paige.feed.rss.managing_editor" }}
|
|
<managingEditor>{{ . }}</managingEditor>
|
|
{{ end }}
|
|
{{ with $title }}
|
|
<title>{{ . }}</title>
|
|
{{ end }}
|
|
{{ with $page.Param "paige.feed.rss.web_master" }}
|
|
<webMaster>{{ . }}</webMaster>
|
|
{{ end }}
|
|
{{ range $pages }}
|
|
<item>
|
|
{{ with partial "paige/authors.html" . }}
|
|
{{ $authors := slice }}
|
|
|
|
{{ range . }}
|
|
{{ $authors = $authors | append .name }}
|
|
{{ end }}
|
|
|
|
<author>{{ delimit $authors ", " }}</author>
|
|
{{ end }}
|
|
{{ if .Content }}
|
|
<description>{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}</description>
|
|
{{ else if .Description }}
|
|
<description>{{ printf "<![CDATA[%s]]>" (.Description | markdownify) | safeHTML }}</description>
|
|
{{ end }}
|
|
{{ with .Permalink }}
|
|
<guid>{{ . }}</guid>
|
|
<link>{{ . }}</link>
|
|
{{ end }}
|
|
{{ with .PublishDate }}
|
|
<pubDate>{{ .Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</pubDate>
|
|
{{ end }}
|
|
{{ with .Title }}
|
|
<title>{{ . | markdownify | plainify | htmlUnescape | safeHTML }}</title>
|
|
{{ end }}
|
|
</item>
|
|
{{ end }}
|
|
</channel>
|
|
</rss>
|