Skip to main content

MkDocs plugin which generates a static RSS feed using git log and page.meta.

Project description

MkDocs RSS plugin

PyPi version badge PyPI - Downloads PyPI - Python Version

codecov Code style: black flake8 Imports: isort pre-commit pre-commit.ci status 📚 Documentation

A plugin for MkDocs, the static site generator, which creates RSS 2.0 feeds using the creation and modification dates from git log and page metadata (YAML frontmatter).

Installation

pip install mkdocs-rss-plugin

Usage

Minimal mkdocs.yml configuration:

site_description: required. Used as feed mandatory channel description.
site_name: required. Used as feed mandatory channel title and items source URL label.
site_url: required. Used to build feed items URLs.

Minimal plugin option:

plugins:
  - rss

Full options:

plugins:
  - rss:
      abstract_chars_count: 160  # -1 for full content
      abstract_delimiter: <!-- more -->
      categories:
        - tags
      comments_path: "#__comments"
      date_from_meta:
        as_creation: "date"
        as_update: false
        datetime_format: "%Y-%m-%d %H:%M"
        default_timezone: Europe/Paris
        default_time: "09:30"
      enabled: true
      feed_ttl: 1440
      image: https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Feed-icon.svg/128px-Feed-icon.svg.png
      length: 20
      pretty_print: false
      match_path: ".*"
      url_parameters:
        utm_source: "documentation"
        utm_medium: "RSS"
        utm_campaign: "feed-syndication"
      use_git: true
      use_material_social_cards: true

For further information, see the user documentation.

Following initiative from the author of Material for MkDocs, this plugin provides its own JSON schema to validate configuration: source - documentation.

Development

Clone the repository:

# install development dependencies
python -m pip install -U -r requirements/development.txt
# alternatively: pip install -e .[dev]

# install project as editable
python -m pip install -e .

# install git hooks
pre-commit install

Then follow the contribution guidelines.

Run the tests

# install development dependencies
python -m pip install -U -r requirements/testing.txt
# alternatively: pip install -e .[test]

# run tests
pytest

Build the documentation

# install dependencies for documentation
python -m pip install -U -r requirements/documentation.txt
# alternatively: pip install -e .[doc]

# build the documentation
mkdocs build

Release workflow

  1. Fill the CHANGELOG.md
  2. Change the version number in __about__.py
  3. Apply a git tag with the relevant version: git tag -a 0.3.0 {git commit hash} -m "New awesome feature"
  4. Push tag to main branch: git push origin 0.3.0

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

mkdocs-rss-plugin-1.11.1.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_rss_plugin-1.11.1-py2.py3-none-any.whl (24.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mkdocs-rss-plugin-1.11.1.tar.gz.

File metadata

  • Download URL: mkdocs-rss-plugin-1.11.1.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for mkdocs-rss-plugin-1.11.1.tar.gz
Algorithm Hash digest
SHA256 cb0419246808c98bff998058794af8327355033cac2817045ab0802a5cbf8632
MD5 8a7ed2230e5cc80c149dabde35711bed
BLAKE2b-256 1b8ac06dfea1db6331a1653ee3436546093ca5547134e41c1d40cac94dc4c1bb

See more details on using hashes here.

File details

Details for the file mkdocs_rss_plugin-1.11.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_rss_plugin-1.11.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8006818f2b57333d02a09960be60511eb97fdd0c6de2306708192a18433b5d33
MD5 57275160da180a2bfb92ee6598a81d1e
BLAKE2b-256 5ca2719a9a2e5344cfd3bc503fc31337e3401a359fdd07ccf27611490df6a316

See more details on using hashes here.

Supported by

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