From ea3171db3da6f881d298a14acc1fea381c76aba6 Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Sat, 21 Jun 2014 16:28:31 +0300 Subject: [PATCH] Add sitemap support --- README.md | 5 +++++ alchemy/templates/sitemap.html | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 alchemy/templates/sitemap.html diff --git a/README.md b/README.md index cbd36c2..8f5b6a6 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,11 @@ An RSS icon will also appear on the nav if `FEED_ATOM` or `FEED_RSS` is set. | GOOGLE_ANALYTICS_ID | TEXT | Google analytics | +#### Sitemap + +[https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml](https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml) + + ## Live Demo [nairobilug.or.ke](http://nairobilug.or.ke) diff --git a/alchemy/templates/sitemap.html b/alchemy/templates/sitemap.html new file mode 100644 index 0000000..5490dac --- /dev/null +++ b/alchemy/templates/sitemap.html @@ -0,0 +1,27 @@ + + + {% for article in articles %} + + {{ SITEURL }}/{{ article.url }} + 0.8 + + {% for translation in article.translations %} + + {{ SITEURL }}/{{ translation.url }} + 0.8 + + {% endfor %} + {% endfor %} + {% for page in pages %} + + {{ SITEURL }}/{{ page.url }} + 1.0 + + {% for translation in page.translations %} + + {{ SITEURL }}/{{ translation.url }} + 1.0 + + {% endfor %} + {% endfor %} +