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).
pip install mkdocs-rss-pluginMinimal 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:
- rssFull options:
plugins:
- rss:
abstract_chars_count: 160# -1 for full contentabstract_delimiter: <!-- more -->categories:
- tagscomments_path: "#__comments"date_from_meta:
as_creation: "date"# means from page.meta.dateas_update: "git"# means from git logdatetime_format: "%Y-%m-%d %H:%M"default_time: "09:30"default_timezone: Europe/Parisenabled: truefeed_description: "My custom feed description"# MkDocs site_description: will be used if this key is not presentfeeds_filenames:
json_created: feed_json_created.jsonjson_updated: feed_json_updated.jsonrss_created: feed_rss_created.xmlrss_updated: feed_rss_updated.xmlfeed_title: "My custom feed title"# MkDocs site_name: will be used if this key is not presentfeed_ttl: 1440image: https://github.com/Guts/mkdocs-rss-plugin/blob/main/docs/assets/logo_rss_plugin_mkdocs.png?raw=truejson_feed_enabled: truelength: 20match_path: ".*"pretty_print: falserss_feed_enabled: trueurl_parameters:
utm_source: "documentation"utm_medium: "RSS"utm_campaign: "feed-syndication"use_git: trueuse_material_blog: trueuse_material_social_cards: trueFor 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.
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 installThen follow the contribution guidelines.
# install development dependencies
python -m pip install -e .[test]
# run tests
pytest# install dependencies for documentation
python -m pip install -e .[docs]
# build the documentation
mkdocs build- Fill the
CHANGELOG.md - Change the version number in
__about__.py - Apply a git tag with the relevant version:
git tag -a 0.3.0 {git commit hash} -m "New awesome feature" - Push tag to main branch:
git push origin 0.3.0