diff --git a/docs/schema.json b/docs/schema.json index 95be3e8..2896f31 100644 --- a/docs/schema.json +++ b/docs/schema.json @@ -1,6 +1,7 @@ { "$schema": "https://json-schema.org/draft-07/schema", - "title": "RSS feeds (i.e. a channel of items) using git log and page metadata.", + "title": "RSS and JSON feeds (i.e. a channel of items) using git log and page metadata.", + "description": "Support multiple instances in a single Mkdocs website.", "oneOf": [ { "markdownDescription": "https://guts.github.io/mkdocs-rss-plugin/", @@ -22,9 +23,15 @@ "default": 160, "minimum": -1 }, + "abstract_delimiter": { + "title": "String to mark where the description ends. Also called excerpt.", + "default": "", + "markdownDescription": "https://guts.github.io/mkdocs-rss-plugin/configuration/#abstract_delimiter", + "type": "string" + }, "categories": { "title": "List of page metadata keys to use as item categories.", - "markdownDescription": "https://guts.github.io/mkdocs-rss-plugin/configuration/#categories-item-categories", + "markdownDescription": "https://guts.github.io/mkdocs-rss-plugin/configuration/#categories", "type": "array", "default": null, "items": { @@ -35,7 +42,7 @@ }, "comments_path": { "title": "Part of URL to the items' comment div.", - "markdownDescription": "https://guts.github.io/mkdocs-rss-plugin/configuration/#comments_path-item-comments-path", + "markdownDescription": "https://guts.github.io/mkdocs-rss-plugin/configuration/#comments_path", "type": "string", "default": null, "format": "uri-reference" @@ -98,6 +105,29 @@ "type": "integer", "default": 1440 }, + "feeds_filenames": { + "title": "Customize output RSS and JSON feeds names.", + "markdownDescription": "https://guts.github.io/mkdocs-rss-plugin/configuration/#feeds_filenames", + "type": "object", + "properties": { + "json_created": { + "default": "feed_json_created.json", + "type": "string" + }, + "json_updated": { + "default": "feed_json_updated.json", + "type": "string" + }, + "rss_created": { + "default": "feed_rss_created.xml", + "type": "string" + }, + "rss_updated": { + "default": "feed_rss_updated.xml", + "type": "string" + } + } + }, "image": { "title": "Feed channel illustration", "markdownDescription": "https://guts.github.io/mkdocs-rss-plugin/configuration/#image-set-the-channel-image", diff --git a/mkdocs_rss_plugin/config.py b/mkdocs_rss_plugin/config.py index b2129bd..e335d58 100644 --- a/mkdocs_rss_plugin/config.py +++ b/mkdocs_rss_plugin/config.py @@ -33,11 +33,11 @@ class RssPluginConfig(Config): date_from_meta = config_options.Optional(config_options.Type(dict)) enabled = config_options.Type(bool, default=True) feed_ttl = config_options.Type(int, default=1440) + feeds_filenames = config_options.SubConfig(_FeedsFilenamesConfig) image = config_options.Optional(config_options.Type(str)) json_feed_enabled = config_options.Type(bool, default=True) length = config_options.Type(int, default=20) match_path = config_options.Type(str, default=".*") - feeds_filenames = config_options.SubConfig(_FeedsFilenamesConfig) pretty_print = config_options.Type(bool, default=False) rss_feed_enabled = config_options.Type(bool, default=True) url_parameters = config_options.Optional(config_options.Type(dict))