Permalink
Browse files

RSS feed and sitemap added

  • Loading branch information...
1 parent 4daf354 commit 7358559e0f4166fa518f532aba5fb02496c7ad65 @matthewmccullough matthewmccullough committed Sep 15, 2012
Showing with 70 additions and 0 deletions.
  1. +27 −0 atom.xml
  2. +43 −0 sitemap.xml
View
@@ -0,0 +1,27 @@
+---
+layout: nil
+---
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+
+ <title>{{ site.title }}</title>
+ <link href="http://{{ site.domain }}/atom.xml" rel="self"/>
+ <link href="http://{{ site.domain }}/"/>
+ <updated>{{ site.time | date_to_xmlschema }}</updated>
+ <id>http://{{ site.domain }}/</id>
+ <author>
+ <name>{{ site.author }}</name>
+ <email>{{ site.email }}</email>
+ </author>
+
+ {% for post in site.posts %}
+ <entry>
+ <title>{{ post.title }}</title>
+ <link href="http://{{ site.domain }}{{ post.url }}"/>
+ <updated>{{ post.date | date_to_xmlschema }}</updated>
+ <id>http://{{ site.domain }}{{ post.id }}</id>
+ <content type="html">{{ post.content | xml_escape }}</content>
+ </entry>
+ {% endfor %}
+
+</feed>
View
@@ -0,0 +1,43 @@
+---
+layout: nil
+---
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+
+ <!-- Homepage -->
+ <url>
+ <loc>http://{{ site.domain }}/</loc>
+ <lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
+ <changefreq>daily</changefreq>
+ <priority>1.0</priority>
+ </url>
+
+ {% for page in site.posts %}
+ <url>
+ <loc>http://{{ site.domain }}{{ page.url }}</loc>
+ {% if page.last_updated %}
+ <lastmod>{{ page.last_updated | date: "%Y-%m-%d" }}</lastmod>
+ {% elsif page.date %}
+ <lastmod>{{ page.date | date: "%Y-%m-%d" }}</lastmod>
+ {% else %}
+ <lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
+ {% endif %}
+ </url>
+ {% endfor %}
+
+ {% for page in site.html_pages %}
+ <url>
+ <loc>http://{{ site.domain }}{{ page.url }}</loc>
+ {% if page.last_updated %}
+ <lastmod>{{ page.last_updated | date: "%Y-%m-%d" }}</lastmod>
+ {% elsif page.date %}
+ <lastmod>{{ page.date | date: "%Y-%m-%d" }}</lastmod>
+ {% else %}
+ <lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
+ {% endif %}
+ {% if page.changefreq %}<changefreq>{{ page.changefreq }}</changefreq>{% endif %}
+ {% if page.priority %}<priority>{{ page.priority }}</priority>{% endif %}
+ </url>
+ {% endfor %}
+
+</urlset>

0 comments on commit 7358559

Please sign in to comment.