Skip to main content

sitemap generator plugin for pelican

Project description

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.

Sources and Status

https://travis-ci.org/dArignac/pelican-extended-sitemap.svg?branch=master https://coveralls.io/repos/dArignac/pelican-extended-sitemap/badge.png?branch=master

Pelican settings

Add to the plugins list:

PLUGINS = [
    'extended_sitemap'
]

Plugin settings

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',
    }
}

Paths for DIRECT_TEMPLATES

The value of the paths for DIRECT_TEMPLATES are defined by the following order:

({NAME} stands for the direct template name, e.g. ARCHIVES for archives.)

  1. if the setting {NAME}_URL is defined, use {NAME}_URL

  2. if the setting {NAME}_URL is not defined but the setting {NAME}_SAVE_AS is, use {NAME}_SAVE_AS

  3. if none of the above applies, use the default filename {NAME}.html

Note that {NAME}_URL is not a default Pelican setting.

Tests

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/.

Changelog

see Github release page.

ToDos

What still has to be implemented:

  • support for multilingual content, see pelican translations (it in fact may work, but I have not tested it)

Contributors

Thanks to all contributers!

Bug Reporters:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pelican-extended-sitemap-1.2.3.tar.gz (19.2 kB view details)

Uploaded Source

File details

Details for the file pelican-extended-sitemap-1.2.3.tar.gz.

File metadata

  • Download URL: pelican-extended-sitemap-1.2.3.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

File hashes

Hashes for pelican-extended-sitemap-1.2.3.tar.gz
Algorithm Hash digest
SHA256 70a82e990334b555176654e140d45726be4333bc98ad4c0692d5ae07f2f5f29a
MD5 132dfec831d6f5954e19f8a47cd23219
BLAKE2b-256 0d96d314d1a1ddf70698f3e2e57e9dc21aedb62702937a89cbf9ec08d55c0814

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page