Merge branch 'master' of git://github.com/getpelican/pelican

This commit is contained in:
Nico Di Rocco 2012-09-07 08:49:00 +02:00
commit 75312305b9
6 changed files with 303 additions and 2 deletions

View file

@ -60,6 +60,9 @@ initialized pelican object
finalized pelican object invoked after all the generators are executed and just before pelican exits
article_generate_context article_generator, metadata
article_generator_init article_generator invoked in the ArticlesGenerator.__init__
get_generators generators invoked in Pelican.get_generator_classes,
can return a Generator, or several
generator in a tuple or in a list.
pages_generate_context pages_generator, metadata
pages_generator_init pages_generator invoked in the PagesGenerator.__init__
========================= ============================ ===========================================================================
@ -109,3 +112,79 @@ variable, as in the example::
``github_activity`` is a list of lists. The first element is the title
and the second element is the raw HTML from GitHub.
Sitemap
-------
The plugin generates a sitemap of the blog.
It can generates plain text sitemaps or XML sitemaps.
Configuration
"""""""""""""
You can use the setting ``SITEMAP`` variable to configure the behavior of the
plugin.
The ``SITEMAP`` variable must be a Python dictionary, it can contain tree keys:
- ``format``, which set the output format of the plugin (``xml`` or ``txt``)
- ``priorities``, which is a dictionary with three keys:
- ``articles``, the priority for the URLs of the articles and their
translations
- ``pages``, the priority for the URLs of the static pages
- ``indexes``, the priority for the URLs of the index pages, such as tags,
author pages, categories indexes, archives, etc...
All the values of this dictionary must be decimal numbers between ``0`` and ``1``.
- ``changefreqs``, which is a dictionary with three items:
- ``articles``, the update frequency of the articles
- ``pages``, the update frequency of the pages
- ``indexes``, the update frequency of the index pages
An valid value is ``always``, ``hourly``, ``daily``, ``weekly``, ``monthly``,
``yearly`` or ``never``.
If a key is missing or a value is incorrect, it will be replaced with the
default value.
The sitemap is saved in ``<output_path>/sitemap.<format>``.
.. note::
``priorities`` and ``changefreqs`` are informations for search engines.
They are only used in the XML sitemaps.
For more information: <http://www.sitemaps.org/protocol.html#xmlTagDefinitions>
Example
"""""""
Here is an example of configuration (it's also the default settings):
.. code-block:: python
PLUGINS=['pelican.plugins.sitemap',]
SITEMAP = {
'format': 'xml',
'priorities': {
'articles': 0.5,
'indexes': 0.5,
'pages': 0.5
},
'changefreqs': {
'articles': 'monthly',
'indexes': 'daily',
'pages': 'monthly'
}
}