Skip to content
Browse files

Support feed.xml as source for RSS readers

  • Loading branch information...
1 parent 8a213a2 commit 4bd9ae9a95306817c01100d56ebf74e74afa799d @kuba-kubula kuba-kubula committed Feb 7, 2013
Showing with 23 additions and 0 deletions.
  1. +2 −0 _layouts/default.html
  2. +21 −0 feed.xml
View
2 _layouts/default.html
@@ -16,6 +16,8 @@
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
+ <link rel="alternate" type="application/rss+xml" title="{{site.title}} Feed" href="{{site.url}}/feed.xml" />
+
<link rel="shortcut icon" href="{{ site.static }}/favicon.ico" />
<link rel="apple-touch-icon-precomposed" href="{{ site.static }}/apple-touch-icon-precomposed.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ site.static }}/apple-touch-icon-72x72-precomposed.png" />
View
21 feed.xml
@@ -0,0 +1,21 @@
+---
+layout: none
+---
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <title>{{ site.title }}</title>
+ <description>{{ site.description }}</description>
+ <link>{{ site.url }}</link>
+ <atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
+ {% for post in site.posts limit:10 %}
+ <item>
+ <title>{{ post.title }}</title>
+ <description>{{ post.excerpt | xml_escape }}</description>
+ <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
+ <link>{{ site.url }}{{ post.url }}</link>
+ <guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
+ </item>
+ {% endfor %}
+ </channel>
+</rss>

0 comments on commit 4bd9ae9

Please sign in to comment.
Something went wrong with that request. Please try again.