aboutsummaryrefslogtreecommitdiff
path: root/layouts/home.rss.xml
blob: f3d7ce3f109a2c0d592447a64199a227eb836187 (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" "in" (slice "journal" "announcements") -}}
{{- $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>