diff --git a/docs/schema.json b/docs/schema.json index 1a7994b93..5fd1ff386 100644 --- a/docs/schema.json +++ b/docs/schema.json @@ -1,11 +1,16 @@ { "$schema": "https://json-schema.org/draft-07/schema", "title": "Material for MkDocs", - "markdownDescription": "Configuration syntax", + "markdownDescription": "Configuration", "type": "object", "properties": { + "INHERIT": { + "title": "Inherit from configuration", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance", + "pattern": "\\.yml$" + }, "site_name": { - "title": "Site name – set in header, title and drawer", + "title": "Site name, used in header, title and drawer", "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#site_name", "type": "string" }, @@ -15,15 +20,89 @@ "type": "string" }, "site_author": { - "title": "Site author, set as meta tag", + "title": "Site author, used in document head", "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#site_author", "type": "string" }, "site_description": { - "title": "Site description, set as meta tag and in social cards", + "title": "Site description, used in document head and in social cards", "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#site_description", "type": "string" }, + "repo_name": { + "title": "Repository name, used in header", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#repository-name", + "type": "string" + }, + "repo_url": { + "title": "Repository URL", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#repository", + "type": "string" + }, + "edit_uri": { + "title": "Path from repository root to directory containing Markdown", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#edit-button", + "type": "string" + }, + "copyright": { + "title": "Copyright, used in footer", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-the-footer/#copyright-notice", + "type": "string" + }, + "docs_dir": { + "title": "Directory containing the Markdown sources", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#docs_dir", + "type": "string", + "default": "docs" + }, + "site_dir": { + "title": "Directory containing the HTML output", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#site_dir", + "type": "string", + "default": "site" + }, + "use_directory_urls": { + "title": "Pages are located in their own directories", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#use_directory_urls", + "type": "boolean", + "default": false + }, + "extra_templates": { + "title": "Additional HTML files to include", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#extra_templates", + "type": "array", + "items": { + "title": "Path to HTML file", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#extra_templates", + "pattern": "\\.html$" + }, + "uniqueItems": true, + "minItems": 1 + }, + "extra_css": { + "title": "Additional CSS files to include", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/customization/#additional-css", + "type": "array", + "items": { + "title": "Path to CSS file", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/customization/#additional-css", + "pattern": "\\.css$" + }, + "uniqueItems": true, + "minItems": 1 + }, + "extra_javascript": { + "title": "Additional JavaScript files to include", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/customization/#additional-javascript", + "type": "array", + "items": { + "title": "Path to JavaScript file", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/customization/#additional-javascript", + "pattern": "\\.js$" + }, + "uniqueItems": true, + "minItems": 1 + }, "theme": { "$ref": "schema/theme.json" }, @@ -32,10 +111,10 @@ }, "markdown_extensions": { "$ref": "schema/extensions.json" + }, + "nav": { + "$ref": "schema/nav.json" } }, - "additionalProperties": false, - "required": [ - "site_name" - ] + "additionalProperties": false } diff --git a/docs/schema/extensions.json b/docs/schema/extensions.json index 23ada55f0..bac985151 100644 --- a/docs/schema/extensions.json +++ b/docs/schema/extensions.json @@ -92,7 +92,8 @@ "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/#toc-permalink", "type": "string" } - ] + ], + "default": true }, "permalink_title": { "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/#toc-permalink-title", @@ -401,7 +402,7 @@ { "oneOf": [ { - "title": "˘ark – Python Markdown Extensions", + "title": "Mark – Python Markdown Extensions", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#caret-mark-tilde", "enum": [ "pymdownx.mark" @@ -411,7 +412,7 @@ "type": "object", "properties": { "pymdownx.mark": { - "title": "˘ark – Python Markdown Extensions", + "title": "Mark – Python Markdown Extensions", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#caret-mark-tilde", "type": "object", "properties": { diff --git a/docs/schema/nav.json b/docs/schema/nav.json new file mode 100644 index 000000000..89cf4fb42 --- /dev/null +++ b/docs/schema/nav.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema", + "title": "Navigation tree", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#nav", + "type": "array", + "items": { + "oneOf": [ + { + "title": "Navigation item", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#nav", + "pattern": "\\.md$" + }, + { + "type": "object", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#nav", + "patternProperties": { + ".*": { + "oneOf": [ + { + "title": "Navigation item", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#nav", + "pattern": "\\.md$" + }, + { + "$ref": "#" + } + ] + } + } + } + ] + }, + "additionalItems": false +} diff --git a/docs/schema/plugins/minify.json b/docs/schema/plugins/minify.json index f9b8d1e24..5dff3d0d6 100644 --- a/docs/schema/plugins/minify.json +++ b/docs/schema/plugins/minify.json @@ -1,7 +1,6 @@ { "$schema": "https://json-schema.org/draft-07/schema", "title": "Minify plugin", - "description": "Configuration syntax", "type": "object", "properties": { "minify": { @@ -17,36 +16,47 @@ }, "properties": { "minify_html": { - "description": "Minify HTML files", - "type": "boolean" + "title": "Minify HTML files", + "markdownDescription": "https://github.com/byrnereese/mkdocs-minify-plugin#options", + "type": "boolean", + "default": true }, "minify_js": { - "description": "Minify JS files", - "type": "boolean" + "title": "Minify JavaScript files", + "markdownDescription": "https://github.com/byrnereese/mkdocs-minify-plugin#options", + "type": "boolean", + "default": true }, "minify_css": { - "description": "Minify CSS files", - "type": "boolean" + "title": "Minify CSS files", + "markdownDescription": "https://github.com/byrnereese/mkdocs-minify-plugin#options", + "type": "boolean", + "default": true }, "htmlmin_opts": { - "description": "Options for HTML minifier", + "title": "Options for HTML minifier", + "markdownDescription": "https://github.com/byrnereese/mkdocs-minify-plugin#options", "type": "object" }, "js_files": { - "description": "List of JS files to minify", + "title": "JavaScript files to minify", + "markdownDescription": "https://github.com/byrnereese/mkdocs-minify-plugin#options", "type": "array", "items": { - "description": "JS file to minify", + "title": "Path to JavaScript file", + "markdownDescription": "https://github.com/byrnereese/mkdocs-minify-plugin#options", "pattern": "\\.js$" }, "uniqueItems": true, "minItems": 1 }, "css_files": { - "description": "List of CSS files to minify", + "title": "CSS files to minify", + "markdownDescription": "https://github.com/byrnereese/mkdocs-minify-plugin#options", "type": "array", "items": { - "description": "CSS file to minify", + "title": "Path to CSS file", + "markdownDescription": "https://github.com/byrnereese/mkdocs-minify-plugin#options", "pattern": "\\.css$" }, "uniqueItems": true, diff --git a/docs/schema/plugins/redirects.json b/docs/schema/plugins/redirects.json index c5359baba..8c1f37af1 100644 --- a/docs/schema/plugins/redirects.json +++ b/docs/schema/plugins/redirects.json @@ -1,7 +1,6 @@ { "$schema": "https://json-schema.org/draft-07/schema", "title": "Redirects plugin", - "description": "Configuration syntax", "type": "object", "properties": { "redirects": { @@ -9,19 +8,20 @@ "type": "object", "properties": { "redirect_maps": { - "description": "Internal and external redirects", + "title": "Mapping of Markdown files", + "markdownDescription": "https://github.com/datarobot/mkdocs-redirects#using", "type": "object", "patternProperties": { "\\.md$": { "oneOf": [ { - "description": "Internal redirect", - "type": "string", + "title": "Internal redirect", + "markdownDescription": "https://github.com/datarobot/mkdocs-redirects#using", "pattern": "\\.md$" }, { - "description": "External redirect", - "type": "string", + "title": "External redirect", + "markdownDescription": "https://github.com/datarobot/mkdocs-redirects#using", "pattern": "^https?:" } ] diff --git a/docs/schema/plugins/search.json b/docs/schema/plugins/search.json index 218e235f7..532def722 100644 --- a/docs/schema/plugins/search.json +++ b/docs/schema/plugins/search.json @@ -1,7 +1,6 @@ { "$schema": "https://json-schema.org/draft-07/schema", "title": "Built-in search plugin", - "description": "Configuration syntax", "oneOf": [ { "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/", @@ -18,7 +17,9 @@ "properties": { "lang": { "oneOf": [ - { "$ref": "#/definitions/lang" }, + { + "$ref": "#/definitions/lang" + }, { "type": "array", "items": { @@ -27,9 +28,11 @@ "uniqueItems": true, "minItems": 1 } - ] + ], + "default": "en" }, "separator": { + "title": "Separator for indexing and query tokenization", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/#search-separator", "type": "string" } @@ -42,118 +45,119 @@ ], "definitions": { "lang": { + "title": "Site search language", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/#search-lang", "oneOf": [ { - "description": "Arabic", + "title": "Site search language: Arabic", "enum": [ "ar" ] }, { - "description": "Danish", + "title": "Site search language: Danish", "enum": [ "da" ] }, { - "description": "German", + "title": "Site search language: German", "enum": [ "de" ] }, { - "description": "Dutch", + "title": "Site search language: Dutch", "enum": [ "du" ] }, { - "description": "English", + "title": "Site search language: English", "enum": [ "en" ] }, { - "description": "Spanish", + "title": "Site search language: Spanish", "enum": [ "es" ] }, { - "description": "Finnish", + "title": "Site search language: Finnish", "enum": [ "fi" ] }, { - "description": "French", + "title": "Site search language: French", "enum": [ "fr" ] }, { - "description": "Hungarian", + "title": "Site search language: Hungarian", "enum": [ "hu" ] }, { - "description": "Italian", + "title": "Site search language: Italian", "enum": [ "it" ] }, { - "description": "Japanese", + "title": "Site search language: Japanese", "enum": [ "ja" ] }, { - "description": "Norwegian", + "title": "Site search language: Norwegian", "enum": [ "no" ] }, { - "description": "Portuguese", + "title": "Site search language: Portuguese", "enum": [ "pt" ] }, { - "description": "Romanian", + "title": "Site search language: Romanian", "enum": [ "ro" ] }, { - "description": "Russian", + "title": "Site search language: Russian", "enum": [ "ru" ] }, { - "description": "Swedish", + "title": "Site search language: Swedish", "enum": [ "sv" ] }, { - "description": "Thai", + "title": "Site search language: Thai", "enum": [ "th" ] }, { - "description": "Turkish", + "title": "Site search language: Turkish", "enum": [ "tr" ] }, { - "description": "Vietnamese", + "title": "Site search language: Vietnamese", "enum": [ "vi" ] diff --git a/docs/schema/theme.json b/docs/schema/theme.json index f7ad54b35..5639c076f 100644 --- a/docs/schema/theme.json +++ b/docs/schema/theme.json @@ -16,18 +16,22 @@ { "type": "null" } - ] + ], + "default": "material" }, "custom_dir": { "title": "Directory with theme overrides", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/customization/#setup-and-theme-structure", - "type": "string" + "type": "string", + "default": "overrides" }, "static_templates": { "title": "Static templates to render", "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#static_templates", "type": "array", "items": { + "title": "Path to HTML file", + "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#static_templates", "pattern": "\\.html$" }, "uniqueItems": true, @@ -343,8 +347,40 @@ "zh-TW" ] } + ], + "default": "en" + }, + "direction": { + "title": "Directionality", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-language/#directionality", + "enum": [ + "ltr", + "rtl" ] }, + "favicon": { + "title": "Favicon", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#favicon", + "pattern": "\\.(ico|png|svg|jpe?g)$" + }, + "logo": { + "title": "Logo (Image)", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#logo", + "pattern": "\\.(png|svg|jpe?g)$" + }, + "icon": { + "title": "Icons", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/", + "type": "object", + "properties": { + "logo": { + "title": "Logo (Icon)", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#logo", + "type": "string", + "default": "material/library" + } + } + }, "features": { "title": "Feature flags", "markdownDescription": "https://squidfunk.github.io/mkdocs-material/", @@ -461,6 +497,127 @@ "uniqueItems": true, "minItems": 1 }, + "palette": { + "oneOf": [ + { + "title": "Color palette", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/", + "type": "object", + "properties": { + "scheme": { + "$ref": "#/definitions/scheme" + }, + "primary": { + "$ref": "#/definitions/primary" + }, + "accent": { + "$ref": "#/definitions/accent" + } + }, + "additionalProperties": false + }, + { + "title": "Color palette", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/", + "type": "array", + "items": { + "type": "object", + "properties": { + "scheme": { + "$ref": "#/definitions/scheme" + }, + "primary": { + "$ref": "#/definitions/primary" + }, + "accent": { + "$ref": "#/definitions/accent" + }, + "media": { + "title": "System preference", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#system-preference", + "oneOf": [ + { + "enum": [ + "\"(prefers-color-scheme: light)\"", + "\"(prefers-color-scheme: dark)\"" + ] + }, + { + "type": "string" + } + ] + }, + "toggle": { + "title": "Color palette toggle", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-palette-toggle", + "properties": { + "icon": { + "title": "Color palette toggle icon", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#toggle-icon", + "type": "string" + }, + "name": { + "title": "Color palette toggle name", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#toggle-name", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "icon", + "name" + ] + } + }, + "additionalProperties": false, + "required": [ + "toggle" + ] + }, + "uniqueItems": true, + "minItems": 1 + } + ], + "default": { + "scheme": "default", + "primary": "indigo", + "accent": "indigo" + } + }, + "font": { + "oneOf": [ + { + "title": "Google Fonts", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-fonts/", + "properties": { + "text": { + "title": "Regular font", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-fonts/#regular-font", + "type": "string", + "default": "Roboto" + }, + "code": { + "title": "Monospaced font", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-fonts/#monospaced-font", + "type": "string", + "default": "Roboto Mono" + } + }, + "additionalProperties": false, + "required": [ + "text", + "code" + ] + }, + { + "title": "Disable Google Fonts", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-fonts/#autoloading", + "enum": [ + false + ] + } + ] + }, "include_search_page": { "title": "Only necessary when installing from git", "markdownDescription": "Must be set to `false`", @@ -479,5 +636,76 @@ "additionalProperties": false, "required": [ "name" - ] + ], + "definitions": { + "scheme": { + "title": "Color scheme", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-scheme", + "oneOf": [ + { + "enum": [ + "default", + "slate" + ] + }, + { + "type": "string" + } + ] + }, + "primary": { + "title": "Primary color", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#primary-color", + "enum": [ + "red", + "pink", + "purple", + "deep purple", + "indigo", + "blue", + "light blue", + "cyan", + "teal", + "green", + "light green", + "lime", + "yellow", + "amber", + "orange", + "deep orange", + "brown", + "grey", + "blue grey", + "black", + "white" + ] + }, + "accent": { + "title": "Accent color", + "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#accent-color", + "enum": [ + "red", + "pink", + "purple", + "deep purple", + "indigo", + "blue", + "light blue", + "cyan", + "teal", + "green", + "light green", + "lime", + "yellow", + "amber", + "orange", + "deep orange", + "brown", + "grey", + "blue-grey", + "black", + "white" + ] + } + } } diff --git a/mkdocs.yml b/mkdocs.yml index c5824d143..427970415 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -83,11 +83,12 @@ theme: code: Roboto Mono favicon: assets/favicon.png icon: - logo: logo + logo: material/library # Plugins plugins: - - search + - search: + lang: en - redirects: redirect_maps: changelog/insiders.md: insiders/changelog.md @@ -158,9 +159,11 @@ markdown_extensions: # Page tree nav: - - Home: index.md + - Home: index.mds - Getting started: + - abcs.md - Installation: getting-started.md + - Installation: getting-started.mds - Creating your site: creating-your-site.md - Publishing your site: publishing-your-site.md - Customization: customization.md