Readme.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Sitemap
  2. -------
  3. The sitemap plugin generates plain-text or XML sitemaps. You can use the
  4. ``SITEMAP`` variable in your settings file to configure the behavior of the
  5. plugin.
  6. The ``SITEMAP`` variable must be a Python dictionary and can contain three keys:
  7. - ``format``, which sets the output format of the plugin (``xml`` or ``txt``)
  8. - ``priorities``, which is a dictionary with three keys:
  9. - ``articles``, the priority for the URLs of the articles and their
  10. translations
  11. - ``pages``, the priority for the URLs of the static pages
  12. - ``indexes``, the priority for the URLs of the index pages, such as tags,
  13. author pages, categories indexes, archives, etc...
  14. All the values of this dictionary must be decimal numbers between ``0`` and ``1``.
  15. - ``changefreqs``, which is a dictionary with three items:
  16. - ``articles``, the update frequency of the articles
  17. - ``pages``, the update frequency of the pages
  18. - ``indexes``, the update frequency of the index pages
  19. Valid frequency values are ``always``, ``hourly``, ``daily``, ``weekly``, ``monthly``,
  20. ``yearly`` and ``never``.
  21. If a key is missing or a value is incorrect, it will be replaced with the
  22. default value.
  23. The sitemap is saved in ``<output_path>/sitemap.<format>``.
  24. .. note::
  25. ``priorities`` and ``changefreqs`` are information for search engines.
  26. They are only used in the XML sitemaps.
  27. For more information: <http://www.sitemaps.org/protocol.html#xmlTagDefinitions>
  28. **Example**
  29. Here is an example configuration (it's also the default settings):
  30. .. code-block:: python
  31. PLUGINS=['pelican.plugins.sitemap',]
  32. SITEMAP = {
  33. 'format': 'xml',
  34. 'priorities': {
  35. 'articles': 0.5,
  36. 'indexes': 0.5,
  37. 'pages': 0.5
  38. },
  39. 'changefreqs': {
  40. 'articles': 'monthly',
  41. 'indexes': 'daily',
  42. 'pages': 'monthly'
  43. }
  44. }