summaryrefslogtreecommitdiff
path: root/layouts/home.rss.xml
blob: 8ec9c25b6a57d24eadbbb283fc87cef68ea1a140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{{- $pages := where site.RegularPages "Section" "journal" -}}
{{- $pages = $pages.ByDate.Reverse -}}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>{{ site.Title }}</title>
    <link>{{ .Permalink }}</link>
    <description>{{ site.Params.description }}</description>
    <language>en</language>
    <atom:link href="{{ "rss.xml" | absURL }}" rel="self" type="application/rss+xml" />
    {{- range $pages }}
    <item>
      <title>{{ .Title }}</title>
      <link>{{ .Permalink }}</link>
      <guid isPermaLink="true">{{ .Permalink }}</guid>
      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</pubDate>
      <description>{{ .Content | transform.XMLEscape | safeHTML }}</description>
    </item>
    {{- end }}
  </channel>
</rss>