Skip to content

MkDocs Material schema

Built-in id: mkdocs:material:9.7

Published at https://hawkeyexl.github.io/manni/schemas/mkdocs-material/9.7.json. A $schema that names this URL resolves to the bundled copy, with no network call.

mkdocs:material:9.7 checks the front matter MkDocs 1.6 and Material for MkDocs 9.7 read from a .md page. It requires nothing, because MkDocs builds a page with no front matter at all. It is one of the platform schemas, which say what a generator accepts rather than what your team agreed.

PropertyValue
Idmkdocs:material:9.7
TitleMkDocs Material front matter v9.7
Files it fits.md
DialectDraft 2020-12
Required fieldsNone
Additional propertiesAllowed (additionalProperties: true)
Reference kindbuiltin
On by defaultNo
Upstream referenceMeta-data and Material reference
JSONmkdocs-material/9.7.json

MkDocs keeps everything under docs_dir, so one override covers the site:

manni.config.yaml
meta:
overrides:
- files: "docs/**"
schemas:
- mkdocs:material:9.7

For a one-off run, pass the id directly:

Terminal window
manni meta validate docs/ -s mkdocs:material:9.7

The two keys MkDocs itself defines, plus the seventeen Material for MkDocs adds on top of them. Material is the theme the overwhelming majority of MkDocs sites run. It is where nearly all of the front matter surface lives. Core MkDocs reads title and template and nothing else. So one id covers both, the way vitepress:page:1.6 covers VitePress and its default theme in one.

FieldTypeNotes
titlestringMkDocs. Fourth of four title sources, so never required.
templatestringMkDocs. The theme template rendering this page.
descriptionstringThe <meta name="description">, and the social card’s text.
authorstringThe <meta name="author">. One name, not a list.
iconstringAn icon shortcode, resolved as .icons/<value>.svg.
statusstringnew and deprecated ship; others come from theme.extra.status.
subtitlestringRendered under the navigation entry. Material 9.6 and later.
hidestring arraynavigation, toc, path, tags, footer, feedback.
tagsstring arrayRead by the tags plugin and added to the search index.
searchobjectexclude and boost.
socialobjectcards, cards_layout, cards_layout_options.
datedate | objectA post’s date, or a mapping requiring created.
authors, categoriesstring arrayA post’s authors and categories.
draft, pinbooleanHold a post back; pin it to the top of a view.
readtimeintegerOverrides the computed reading time, in minutes.
slugstringOverrides a post’s URL segment.
linksarrayA post’s sidebar links, in nav shape.

hide is the field this schema exists for. Material decides what to hide by testing membership of the list, with "navigation" in page.meta.hide. It says nothing at all about an entry it does not recognise, so hide: [sidebar] builds cleanly and hides nothing. The six values are transcribed from the templates that test them, not from a documentation page, so the list is what the theme actually honours.

The rest of the value is in the typing. readtime, draft and pin go through the blog plugin’s own configuration validation, which refuses a quoted number or a quoted boolean outright. tags reaches a search plugin that checks isinstance(tags, list) and skips a bare string without a word. boost is copied into the search index exactly as written, so a quoted one ranks nothing.

Allowed. A key neither MkDocs nor Material defines passes unchecked.

A page carrying the Material page keys, at legal values. This is test/fixtures/platform/mkdocs-valid.md, and it passes.

docs/cache.md
---
title: Configuring the cache
description: How the build cache works and when to clear it.
author: Docs team
icon: material/cached
status: new
subtitle: Build performance
template: reference.html
hide:
- navigation
- toc
- path
- tags
- footer
- feedback
tags:
- caching
- performance
search:
boost: 2
exclude: false
social:
cards: true
cards_layout: default
cards_layout_options:
background_color: "#4051b5"
title: Cache
---

sidebar is not a value any Material template tests for, so it hides nothing. The build succeeds, and the schema reports the entry:

test/fixtures/platform/mkdocs-bad-hide.md
---
title: Release notes
hide:
- sidebar
---
✗ test/fixtures/platform/mkdocs-bad-hide.md
/hide/0 must be equal to one of the allowed values (line 4) [mkdocs:material:9.7]
1 file checked, 0 passed, 1 failed, 1 error

Use navigation to hide the navigation sidebar, or toc to hide the table of contents.