Added sitemap.xml

This commit is contained in:
Oliver Davies 2015-04-12 08:13:43 +01:00
parent 0a42d0a991
commit d7d9fb1a8d

22
source/sitemap.html.twig Normal file
View file

@ -0,0 +1,22 @@
---
permalink: sitemap.xml
use:
- posts
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{{ site.url }}</loc>
<lastmod>{{ site.calculated_date | date('Y-m-d') }}</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
{% for post in data.posts %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
<lastmod>{{ post.date|date('c') }}</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
{% endfor %}
</urlset>