Skip to content

Commit

Permalink
Improve JSON Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jan 23, 2023
1 parent fab1f02 commit d3ba200
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@
},
"nav": {
"$ref": "schema/nav.json"
},
"watch": {
"items": {
"title": "Path to watch for changes",
"type": "string"
},
"type": "array"
}
},
"additionalProperties": false
Expand Down
8 changes: 8 additions & 0 deletions docs/schema/extensions/markdown.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
"attr_list"
]
},
{
"title": "Markdown extension: a classier syntax for admonitions",
"markdownDescription": "https://github.com/oprypin/markdown-callouts",
"enum": [
"markdown.extensions.callouts",
"callouts"
]
},
{
"title": "Definition Lists – Python Markdown",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/#definition-lists",
Expand Down
52 changes: 50 additions & 2 deletions docs/schema/extensions/pymdownx.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,18 +324,66 @@
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/",
"type": "object",
"properties": {
"hide_protocol":{
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "boolean",
"default": false
},
"labels": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#labels",
"type": "object",
"default": {
"commit": "Commit",
"compare": "Compare",
"issue": "Issue",
"pull": "Pull Request",
"mention": "User",
"repository": "Repository"
}
},
"normalize_issue_symbols": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "boolean",
"default": false
},
"user": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "string"
"type": "string",
"default": ""
},
"provider": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "string",
"default": "github"
},
"repo": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "string"
"type": "string",
"repo": ""
},
"repo_url_shorthand": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "boolean",
"default": true
},
"repo_url_shortener": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "boolean",
"default": false
},
"social_url_shorthand": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "boolean",
"default": false
},
"social_url_shortener": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#options",
"type": "boolean",
"default": false
},
"shortener_user_exclude": {
"markdownDescription": "https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/#user-excludes",
"type": "object"
}
},
"additionalProperties": false,
Expand Down
6 changes: 6 additions & 0 deletions docs/schema/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"external": {
"description": "External plugins, schema provided by us",
"oneOf": [
{
"$ref": "plugins/external/gen-files.json"
},
{
"$ref": "plugins/external/git-authors.json"
},
Expand All @@ -71,6 +74,9 @@
},
{
"$ref": "plugins/external/redirects.json"
},
{
"$ref": "plugins/external/section-index.json"
}
]
},
Expand Down
28 changes: 28 additions & 0 deletions docs/schema/plugins/external/gen-files.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"title": "MkDocs plugin to programmatically generate documentation pages during the build",
"oneOf": [
{
"markdownDescription": "https://github.com/oprypin/mkdocs-gen-files",
"enum": [
"git-authors"
]
},
{
"type": "object",
"properties": {
"gen-files": {
"additionalProperties": false,
"properties": {
"scripts": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": ["object", "null"]
}
}
}]
}
19 changes: 19 additions & 0 deletions docs/schema/plugins/external/section-index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"title": "MkDocs plugin to allow clickable sections that lead to an index page",
"oneOf": [
{
"markdownDescription": "https://github.com/oprypin/mkdocs-section-index",
"enum": [
"section-index"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"section-index": {
}
}
}]
}

0 comments on commit d3ba200

Please sign in to comment.