A sitemap plugin for Pelican.
It generates a sitemap.xml according to the specification of sitemaps.org and considers the pelican index page, articles, pages and special pages (like tags, categories, authors). Also comes with a XML stylesheet to be able to view the sitemap in browser without pain.
There is also a sitemap plugin within the official pelican plugin repo. The main differences in my package are:
- the overview pages for tags, pages aso are included
- there is a stylesheet
- used dates do not include time
NOTICE: Backwards incompatible changes in 1.0.0:
In version 1.0.0 the package naming has been fixed, it's now called "extended_sitemap" (instead "extended-sitemap") following PEP8. Please adjust your usages in PLUGINS appropriately.
- Github: https://github.com/dArignac/pelican-extended-sitemap
- PyPI: https://pypi.python.org/pypi/pelican-extended-sitemap
Add to the plugins list:
PLUGINS = [
'extended_sitemap'
]
Add the EXTENDED_SITEMAP_PLUGIN dict to your settings. The keys explained:
- priorities: priority for each page type, from 0.0 to 1.0
- index: index page
- articles: article pages
- pages: pages
- others: category, tags and authors pages
- changefrequencies: how often a page will likely change, possible values: always, hourly, daily, weekly, monthly, yearly, never
The settings below are the default values:
EXTENDED_SITEMAP_PLUGIN = {
'priorities': {
'index': 1.0,
'articles': 0.8,
'pages': 0.5,
'others': 0.4
},
'changefrequencies': {
'index': 'daily',
'articles': 'weekly',
'pages': 'monthly',
'others': 'monthly',
}
}
nose is required to run the tests. Install the package and run with the nosetest command.
The tests fixture files were created with generated content by http://jaspervdj.be/lorem-markdownum/.
see Github release page.
What still has to be implemented:
- support for multilingual content, see pelican translations (it in fact may work, but I have not tested it)