pelican-sitemap


Namepelican-sitemap JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/pelican-plugins/sitemap
SummaryPelican plugin to generate sitemap in plain-text or XML format
upload_time2023-07-24 12:49:23
maintainer
docs_urlNone
authorPelican Dev Team
requires_python>=3.8.1,<4.0
licenseAGPL-3.0
keywords pelican plugin sitemap
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Sitemap
=======

[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/sitemap/main.yml?branch=main)](https://github.com/pelican-plugins/sitemap/actions)
[![PyPI Version](https://img.shields.io/pypi/v/pelican-sitemap)](https://pypi.org/project/pelican-sitemap/)
![License](https://img.shields.io/pypi/l/pelican-sitemap?color=blue)

This [Pelican][] plugin generates a site map in plain-text or XML format. You can use the `SITEMAP` variable in your settings file to configure the behavior of the plugin.

Installation
------------

This plugin can be installed via:

    python -m pip install pelican-sitemap

Usage
-----

The `SITEMAP` setting must be a Python dictionary and can contain these keys:

* `format`, which sets 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

    Valid frequency values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly` and `never`.

* `exclude`, which is a list of regular expressions that will be used to exclude matched URLs from the sitemap if *any* of them match. For example:

```python
SITEMAP = {
    "exclude": [
        "^/noindex/",  # starts with "/noindex/"
        "/tag/",       # contains "/tag/"
        "\.json$",     # ends with ".json"
    ]
}
```

If a key is missing or a value is incorrect, it will be replaced with the default value.

You can also exclude an individual URL by adding metadata to it, setting `private` to `True`.

The sitemap is saved in: `<output_path>/sitemap.<format>`

> **Note:** `priorities` and `changefreqs` are information for search engines and are only used in the XML site maps. For more information, see: <https://www.sitemaps.org/protocol.html#xmlTagDefinitions>

**Example**

Here is an example configuration (it is also the default settings):

```python
SITEMAP = {
    "format": "xml",
    "priorities": {
        "articles": 0.5,
        "indexes": 0.5,
        "pages": 0.5
    },
    "changefreqs": {
        "articles": "monthly",
        "indexes": "daily",
        "pages": "monthly"
    }
}
```

Contributing
------------

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][].

To start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.

[Pelican]: https://github.com/getpelican/pelican
[existing issues]: https://github.com/pelican-plugins/sitemap/issues
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html

License
-------

This project is licensed under the [AGPL-3.0](http://www.gnu.org/licenses/agpl-3.0-standalone.html) license.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pelican-plugins/sitemap",
    "name": "pelican-sitemap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0",
    "maintainer_email": "",
    "keywords": "pelican,plugin,sitemap",
    "author": "Pelican Dev Team",
    "author_email": "authors@getpelican.com",
    "download_url": "https://files.pythonhosted.org/packages/cd/11/5ccc1e52e3122186c8bee07bbbcdf2d6a1b42feaeadf9cec4262b87828fc/pelican_sitemap-1.1.0.tar.gz",
    "platform": null,
    "description": "Sitemap\n=======\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/sitemap/main.yml?branch=main)](https://github.com/pelican-plugins/sitemap/actions)\n[![PyPI Version](https://img.shields.io/pypi/v/pelican-sitemap)](https://pypi.org/project/pelican-sitemap/)\n![License](https://img.shields.io/pypi/l/pelican-sitemap?color=blue)\n\nThis [Pelican][] plugin generates a site map in plain-text or XML format. You can use the `SITEMAP` variable in your settings file to configure the behavior of the plugin.\n\nInstallation\n------------\n\nThis plugin can be installed via:\n\n    python -m pip install pelican-sitemap\n\nUsage\n-----\n\nThe `SITEMAP` setting must be a Python dictionary and can contain these keys:\n\n* `format`, which sets the output format of the plugin (`xml` or `txt`)\n\n* `priorities`, which is a dictionary with three keys:\n\n    - `articles`, the priority for the URLs of the articles and their translations\n\n    - `pages`, the priority for the URLs of the static pages\n\n    - `indexes`, the priority for the URLs of the index pages, such as tags, author pages, categories indexes, archives, etc.\n\n    All the values of this dictionary must be decimal numbers between `0` and `1`.\n\n* `changefreqs`, which is a dictionary with three items:\n\n    - `articles`, the update frequency of the articles\n\n    - `pages`, the update frequency of the pages\n\n    - `indexes`, the update frequency of the index pages\n\n    Valid frequency values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly` and `never`.\n\n* `exclude`, which is a list of regular expressions that will be used to exclude matched URLs from the sitemap if *any* of them match. For example:\n\n```python\nSITEMAP = {\n    \"exclude\": [\n        \"^/noindex/\",  # starts with \"/noindex/\"\n        \"/tag/\",       # contains \"/tag/\"\n        \"\\.json$\",     # ends with \".json\"\n    ]\n}\n```\n\nIf a key is missing or a value is incorrect, it will be replaced with the default value.\n\nYou can also exclude an individual URL by adding metadata to it, setting `private` to `True`.\n\nThe sitemap is saved in: `<output_path>/sitemap.<format>`\n\n> **Note:** `priorities` and `changefreqs` are information for search engines and are only used in the XML site maps. For more information, see: <https://www.sitemaps.org/protocol.html#xmlTagDefinitions>\n\n**Example**\n\nHere is an example configuration (it is also the default settings):\n\n```python\nSITEMAP = {\n    \"format\": \"xml\",\n    \"priorities\": {\n        \"articles\": 0.5,\n        \"indexes\": 0.5,\n        \"pages\": 0.5\n    },\n    \"changefreqs\": {\n        \"articles\": \"monthly\",\n        \"indexes\": \"daily\",\n        \"pages\": \"monthly\"\n    }\n}\n```\n\nContributing\n------------\n\nContributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][].\n\nTo start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.\n\n[Pelican]: https://github.com/getpelican/pelican\n[existing issues]: https://github.com/pelican-plugins/sitemap/issues\n[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html\n\nLicense\n-------\n\nThis project is licensed under the [AGPL-3.0](http://www.gnu.org/licenses/agpl-3.0-standalone.html) license.\n\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "Pelican plugin to generate sitemap in plain-text or XML format",
    "version": "1.1.0",
    "project_urls": {
        "Documentation": "https://docs.getpelican.com",
        "Funding": "https://donate.getpelican.com/",
        "Homepage": "https://github.com/pelican-plugins/sitemap",
        "Issue Tracker": "https://github.com/pelican-plugins/sitemap/issues",
        "Repository": "https://github.com/pelican-plugins/sitemap"
    },
    "split_keywords": [
        "pelican",
        "plugin",
        "sitemap"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9145786d12807c7b77a2729fcc10a2b70e7825fa90ad963b09011279aa12e6c",
                "md5": "8372a5b0bea103250783af814f81e335",
                "sha256": "bc069d8f89a9d544f6c6941731dc91bd53c89f549a31974eca25f3294b343d9e"
            },
            "downloads": -1,
            "filename": "pelican_sitemap-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8372a5b0bea103250783af814f81e335",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0",
            "size": 6764,
            "upload_time": "2023-07-24T12:49:21",
            "upload_time_iso_8601": "2023-07-24T12:49:21.632882Z",
            "url": "https://files.pythonhosted.org/packages/a9/14/5786d12807c7b77a2729fcc10a2b70e7825fa90ad963b09011279aa12e6c/pelican_sitemap-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd115ccc1e52e3122186c8bee07bbbcdf2d6a1b42feaeadf9cec4262b87828fc",
                "md5": "b7c464bbe5fbbb32b72fe259cba34491",
                "sha256": "d4bd8dfbdc8d778c23a293fbcfd4c19ccd44353ae3d263b8be74a6a2368cd9ab"
            },
            "downloads": -1,
            "filename": "pelican_sitemap-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b7c464bbe5fbbb32b72fe259cba34491",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0",
            "size": 6451,
            "upload_time": "2023-07-24T12:49:23",
            "upload_time_iso_8601": "2023-07-24T12:49:23.512043Z",
            "url": "https://files.pythonhosted.org/packages/cd/11/5ccc1e52e3122186c8bee07bbbcdf2d6a1b42feaeadf9cec4262b87828fc/pelican_sitemap-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-24 12:49:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pelican-plugins",
    "github_project": "sitemap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pelican-sitemap"
}
        
Elapsed time: 0.09293s