Skip to content

Commit

Permalink
Add template for RSS 2.0 feed.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpitt committed Dec 17, 2013
1 parent de038e2 commit 64160de
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions feed/rss.xml
@@ -0,0 +1,35 @@
---
layout: nil
---
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>PittGeek</title>
<link>{{ site.canonical_url }}/</link>
<atom:link href="{{ site.canonical_url }}/feed/rss.xml" rel="self" type="application/rss+xml" />
<description>A blog only a geek could love</description>
<language>en-us</language>
<pubDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<lastBuildDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</lastBuildDate>

{% for post in site.posts %}
{% if post.external-url %}
{% capture title_url %}{{ post.external-url }}{% endcapture %}
{% else %}
{% capture title_url %}{{ site.canonical_url }}{{ post.url }}{% endcapture %}
{% endif %}
<item>
<title>{{ post.title }}</title>
<link>{{ title_url }}</link>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<author>kenny.pitt@gmail.com (Kenny Pitt)</author>
{% for category in post.tags %}
<category>{{ category | xml_escape }}</category>
{% endfor %}
<guid>{{ site.canonical_url }}{{ post.id }}</guid>
<description>{{ post.content | xml_escape }}</description>
</item>
{% endfor %}

</channel>
</rss>

0 comments on commit 64160de

Please sign in to comment.