summaryrefslogtreecommitdiff
path: root/layouts/home.rss.xml
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/home.rss.xml')
-rw-r--r--layouts/home.rss.xml21
1 files changed, 21 insertions, 0 deletions
diff --git a/layouts/home.rss.xml b/layouts/home.rss.xml
new file mode 100644
index 0000000..8ec9c25
--- /dev/null
+++ b/layouts/home.rss.xml
@@ -0,0 +1,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>