summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-11-08 15:52:18 -0600
committerDan McGee <dan@archlinux.org>2014-11-08 15:54:56 -0600
commita3015ba8429a09878ed6c35d7c7c76a882de7dcf (patch)
treed843983822650f7734f799b9b0c9a2d50ebb6ea3 /templates
parent1a35cbe842212d674d83196ecfa70569ffe2e2da (diff)
Override default sitemap.xml template
The Django one uses the spaceless tag, which isn't all that useful when we are gzipping the response anyway. Remove it to make generation a tad faster. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/sitemaps/sitemap.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/sitemaps/sitemap.xml b/templates/sitemaps/sitemap.xml
new file mode 100644
index 00000000..50a95237
--- /dev/null
+++ b/templates/sitemaps/sitemap.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+{% for url in urlset %}<url>
+<loc>{{ url.location }}</loc>
+{% if url.lastmod %}<lastmod>{{ url.lastmod|date:"Y-m-d" }}</lastmod>{% endif %}
+{% if url.changefreq %}<changefreq>{{ url.changefreq }}</changefreq>{% endif %}
+{% if url.priority %}<priority>{{ url.priority }}</priority>{% endif %}
+</url>{% endfor %}
+</urlset>