Skip to content

Instantly share code, notes, and snippets.

@alswl
Created May 22, 2012 08:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alswl/2767610 to your computer and use it in GitHub Desktop.
Save alswl/2767610 to your computer and use it in GitHub Desktop.
rss.xml for Octopress
---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<description><![CDATA[{{ site.title }}]]></description>
<title><![CDATA[{{ site.title }}]]></title>
<link>{{ site.url }}/</link>
<pubDate>{{ site.time | date_to_xmlschema }}</pubDate>
{% for post in site.posts limit: 20 %}
<item>
<description>
<![CDATA[
{{ post.content | expand_urls: site.url | cdata_escape }}
{% include post/copyright.html %}
]]>
</description>
<title><![CDATA[{{ post.title | cdata_escape }}]]></title>
<link>{{ site.url }}{{ post.url }}</link>
<pubDate>{{ post.date | date_to_xmlschema }}</pubDate>
<guid isPermaLink="false">{{ site.url }}{{ post.id }}</guid>
<source url="{{ site.url }}/rss.xml"><![CDATA[{{ site.title }}]]></source>
</item>
{% endfor %}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment