Skip to content

Commit

Permalink
Add XML sitemap.
Browse files Browse the repository at this point in the history
  • Loading branch information
SadieCat committed Mar 31, 2012
1 parent d72dda4 commit 791d14f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
6 changes: 5 additions & 1 deletion robots.txt
@@ -1,2 +1,6 @@
# www.robotstxt.org
User-agent: *

User-agent: *
Disallow: /assets

Sitemap: /sitemap.xml
22 changes: 22 additions & 0 deletions sitemap.xml
@@ -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.