Updated schema.json

This commit is contained in:
squidfunk 2022-06-05 10:26:58 +02:00
parent 7998dbf06a
commit 093b6e6aaa
4 changed files with 86 additions and 55 deletions

View File

@ -143,19 +143,5 @@
"$ref": "schema/nav.json" "$ref": "schema/nav.json"
} }
}, },
"additionalProperties": false, "additionalProperties": false
"defaultSnippets": [
{
"label": "site_author",
"body": "${1:Jane Doe}"
},
{
"label": "repo_url",
"body": "repo_url: https://github.com/${1:user}/${2:repo}"
},
{
"label": "copyright",
"body": "copyright: Copyright © 2022 ${1:Jane Doe}"
}
]
} }

View File

@ -142,13 +142,7 @@
] ]
} }
}, },
"additionalProperties": false, "additionalProperties": false
"defaultSnippets": [
{
"label": "permalink",
"body": "permalink: true"
}
]
} }
} }
} }

View File

@ -16,9 +16,10 @@
"properties": { "properties": {
"provider": { "provider": {
"title": "Analytics provider", "title": "Analytics provider",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/#google-analytics",
"oneOf": [ "oneOf": [
{ {
"title": "Google Analytics",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/#google-analytics",
"enum": [ "enum": [
"google" "google"
] ]
@ -108,7 +109,7 @@
], ],
"defaultSnippets": [ "defaultSnippets": [
{ {
"label": "feedback", "label": "feedback (default)",
"body": { "body": {
"feedback": { "feedback": {
"title": "${1:Was this page helpful}", "title": "${1:Was this page helpful}",
@ -153,39 +154,19 @@
"type": "object", "type": "object",
"properties": { "properties": {
"analytics": { "analytics": {
"title": "Cookie", "$ref": "#/definitions/cookie"
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"title": "Cookie name",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"type": "string"
},
"checked": {
"title": "Initial state",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"type": "boolean",
"default": true
} }
}, },
"additionalProperties": false, "patternProperties": {
"required": [ "\\w+": {
"name" "$ref": "#/definitions/cookie"
]
},
{
"type": "string"
}
]
} }
}, },
"additionalProperties": false, "additionalProperties": false,
"defaultSnippets": [ "defaultSnippets": [
{ {
"label": "analytics", "label": "analytics (default)",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"body": { "body": {
"analytics": { "analytics": {
"name": "Google Analytics", "name": "Google Analytics",
@ -194,9 +175,48 @@
} }
} }
] ]
},
"actions": {
"title": "Cookie consent actions",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"type": "array",
"items": {
"oneOf": [
{
"title": "Button to accept cookies",
"enum": [
"accept"
]
},
{
"title": "Button to reject cookies",
"enum": [
"reject"
]
},
{
"title": "Button to manage settings",
"enum": [
"manage"
]
}
]
}
} }
}, },
"additionalProperties": false, "additionalProperties": false,
"defaultSnippets": [
{
"label": "actions (default)",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"body": {
"actions": [
"accept",
"manage"
]
}
}
],
"required": [ "required": [
"title", "title",
"description" "description"
@ -304,6 +324,37 @@
}, },
"additionalProperties": true, "additionalProperties": true,
"definitions": { "definitions": {
"cookie": {
"title": "Cookie",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"title": "Cookie name",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"type": "string"
},
"checked": {
"title": "Initial state",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"type": "boolean",
"default": true
}
},
"additionalProperties": false,
"required": [
"name"
]
},
{
"title": "Cookie name",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"type": "string"
}
]
},
"icon": { "icon": {
"oneOf": [ "oneOf": [
{ {
@ -318,7 +369,7 @@
}, },
"defaultSnippets": [ "defaultSnippets": [
{ {
"label": "analytics", "label": "analytics (default)",
"body": { "body": {
"analytics": { "analytics": {
"provider": "${1:google}", "provider": "${1:google}",

View File

@ -387,7 +387,7 @@
"pattern": "\\.(ico|png|svg|jpe?g)$", "pattern": "\\.(ico|png|svg|jpe?g)$",
"defaultSnippets": [ "defaultSnippets": [
{ {
"body": "${1}.png" "body": "${1:path/to/file}.png"
} }
] ]
}, },
@ -397,7 +397,7 @@
"pattern": "\\.(png|svg|jpe?g)$", "pattern": "\\.(png|svg|jpe?g)$",
"defaultSnippets": [ "defaultSnippets": [
{ {
"body": "${1}.png" "body": "${1:path/to/file}.png"
} }
] ]
}, },