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"
}
},
"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}"
}
]
"additionalProperties": false
}

View File

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

View File

@ -16,9 +16,10 @@
"properties": {
"provider": {
"title": "Analytics provider",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/#google-analytics",
"oneOf": [
{
"title": "Google Analytics",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/#google-analytics",
"enum": [
"google"
]
@ -108,7 +109,7 @@
],
"defaultSnippets": [
{
"label": "feedback",
"label": "feedback (default)",
"body": {
"feedback": {
"title": "${1:Was this page helpful}",
@ -153,39 +154,19 @@
"type": "object",
"properties": {
"analytics": {
"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
"$ref": "#/definitions/cookie"
}
},
"additionalProperties": false,
"required": [
"name"
]
},
{
"type": "string"
}
]
"patternProperties": {
"\\w+": {
"$ref": "#/definitions/cookie"
}
},
"additionalProperties": false,
"defaultSnippets": [
{
"label": "analytics",
"label": "analytics (default)",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"body": {
"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,
"defaultSnippets": [
{
"label": "actions (default)",
"markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/#cookie-consent",
"body": {
"actions": [
"accept",
"manage"
]
}
}
],
"required": [
"title",
"description"
@ -304,6 +324,37 @@
},
"additionalProperties": true,
"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": {
"oneOf": [
{
@ -318,7 +369,7 @@
},
"defaultSnippets": [
{
"label": "analytics",
"label": "analytics (default)",
"body": {
"analytics": {
"provider": "${1:google}",

View File

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