Skip to content

Instantly share code, notes, and snippets.

@osahyoun
Created August 4, 2012 09:57
Show Gist options
  • Save osahyoun/3256481 to your computer and use it in GitHub Desktop.
Save osahyoun/3256481 to your computer and use it in GitHub Desktop.
Valid RSS Feed Template for Jekyll
---
layout: foobar
---
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.name }} - Latest Posts</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}</link>
<atom:link href="{{ site.feed_url }}" rel="self" type="application/rss+xml" />
{% for post in site.posts %}
{% unless post.link %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date:"%a, %d %b %Y %T %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid>{{ site.url }}{{ post.url }}</guid>
</item>
{% endunless %}
{% endfor %}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment