From 34cbd13c28ea7489efd3010c1767b9cb37b29400 Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Mon, 16 Jun 2014 21:03:11 +0300 Subject: [PATCH] Add sitemap support --- README.md | 10 ++++++++++ alchemy/templates/sitemap.html | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 alchemy/templates/sitemap.html diff --git a/README.md b/README.md index 3e7e625..223c4ca 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,24 @@ A theme for the [Pelican](http://getpelican.com) static site generator. A shameless rip off of @porterjamesj's [crowsfoot](http://github.com/porterjamesj/crowsfoot) theme. + ## Screenshot ![pelican-alchemy](screenshot.png) + ## Installation `git clone https://github.com/nairobilug/pelican-alchemy.git` Then set the pelican config variable `THEME` to the `alchemy` folder inside the cloned path. + ## Usage Pelican [documentation](http://docs.getpelican.com/en/latest/) + ### Theme Options | Config | Type | Description | @@ -43,6 +47,12 @@ An RSS icon will also appear on the nav if `FEED_ATOM` or `FEED_RSS` is set. | GOOGLE_ANALYTICS_ID | TEXT | Google analytics | | GOOGLE_ANALYTICS_DOMAIN | TEXT | Google analytics | + +#### Sitemap + +Ref: 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..a1c782b --- /dev/null +++ b/alchemy/templates/sitemap.html @@ -0,0 +1,30 @@ + + + {% 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 %} +