Skip to content

Commit

Permalink
docs: complete JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Jun 10, 2024
1 parent 3f57949 commit ce525e8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
36 changes: 33 additions & 3 deletions docs/schema.json
Original file line number Diff line number Diff line change
@@ -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/",
Expand All @@ -22,9 +23,15 @@
"default": 160,
"minimum": -1
},
"abstract_delimiter": {
"title": "String to mark where the description ends. Also called excerpt.",
"default": "<!-- more -->",
"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": {
Expand All @@ -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"
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion mkdocs_rss_plugin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ce525e8

Please sign in to comment.