Permalink
Browse files

Add XML sitemap.

  • Loading branch information...
SaberUK committed Mar 31, 2012
1 parent d72dda4 commit 791d14fd449655b73331628b0db31c434e05854a
Showing with 27 additions and 1 deletion.
  1. +5 −1 robots.txt
  2. +22 −0 sitemap.xml
View
@@ -1,2 +1,6 @@
# www.robotstxt.org
-User-agent: *
+
+User-agent: *
+Disallow: /assets
+
+Sitemap: /sitemap.xml
View
@@ -0,0 +1,22 @@
+---
+layout: nil
+---
+<?xml version="1.0" encoding="utf-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+ <url>
+ <loc>{{ site.info.uri }}</loc>
+ <lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
+ <changefreq>daily</changefreq>
+ <priority>1.0</priority>
+ </url>
+ {% for post in site.posts %}
+ <url>
+ <loc>{{ site.info.uri }}{{ post.url }}</loc>
+ {% if post.date %}
+ <lastmod>{{ post.date | date: "%Y-%m-%d" }}</lastmod>
+ {% else %}
+ <lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
+ {% endif %}
+ </url>
+ {% endfor %}
+</urlset>

0 comments on commit 791d14f

Please sign in to comment.