Skip to main content

MkDocs plugin to generate RSS and JSON feeds using Mkdocs site configuration, git log and Mkdocs pages'meta.

Project description

MkDocs RSS plugin

PyPi version badge PyPI - Downloads PyPI - Python Version

Quality Gate Status 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 and JSON Feed 1.1 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" # means from page.meta.date
        as_update: "git" # means from git log
        datetime_format: "%Y-%m-%d %H:%M"
        default_time: "09:30"
        default_timezone: Europe/Paris
      enabled: true
      feed_description: "My custom feed description"  # MkDocs site_description: will be used if this key is not present
      feeds_filenames:
        json_created: feed_json_created.json
        json_updated: feed_json_updated.json
        rss_created: feed_rss_created.xml
        rss_updated: feed_rss_updated.xml
      feed_title: "My custom feed title"  # MkDocs site_name: will be used if this key is not present
      feed_ttl: 1440
      image: https://github.com/Guts/mkdocs-rss-plugin/blob/main/docs/assets/logo_rss_plugin_mkdocs.png?raw=true
      json_feed_enabled: true
      length: 20
      match_path: ".*"
      pretty_print: false
      rss_feed_enabled: true
      url_parameters:
        utm_source: "documentation"
        utm_medium: "RSS"
        utm_campaign: "feed-syndication"
      use_git: true
      use_material_blog: 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

Once you cloned the repository:

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

# including development dependencies
python -m pip install -e .[dev]

# including documentation dependencies
python -m pip install -e .[docs]

# including testing dependencies
python -m pip install -e .[test]

# all inclusive
python -m pip install -e .[dev,docs,test]

# install git hooks
pre-commit install

Then follow the contribution guidelines.

Run the tests

# install development dependencies
python -m pip install -e .[test]

# run tests
pytest

Build the documentation

# install dependencies for documentation
python -m pip install -e .[docs]

# 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.17.9.tar.gz (569.6 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.17.9-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_rss_plugin-1.17.9.tar.gz.

File metadata

  • Download URL: mkdocs_rss_plugin-1.17.9.tar.gz
  • Upload date:
  • Size: 569.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mkdocs_rss_plugin-1.17.9.tar.gz
Algorithm Hash digest
SHA256 1c30b192a73a46714c3c5f2f1fbc4b15850ed719106eb241de99891adb7e6258
MD5 5b44332e39a55877237ceb8264224baf
BLAKE2b-256 ec38c18a11ff6f3141cbb8fb7c847fdf9deba05e05d658940a09f8f5b787c8fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_rss_plugin-1.17.9.tar.gz:

Publisher: release.yml on Guts/mkdocs-rss-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_rss_plugin-1.17.9-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_rss_plugin-1.17.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7aaa607d0a19f03343e83f4ee1b193e1d6f5af19b853546878c4b57fe406e0c4
MD5 dfb083a666faa0f062a6f225e83f7f28
BLAKE2b-256 3dc38315e728b5f91e5616451b4f4662fbcf33b316a1bbfbf6981a966ab982b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_rss_plugin-1.17.9-py3-none-any.whl:

Publisher: release.yml on Guts/mkdocs-rss-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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