Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: complete JSON schema with latest features #282

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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