VitePress page schema
Built-in id: vitepress:page:1.6
Published at https://hawkeyexl.github.io/manni/schemas/vitepress/1.6.json. A
$schema that names this URL resolves to the bundled copy, with no network
call.
vitepress:page:1.6 checks the front matter VitePress 1.6 reads from a .md
page. It requires nothing, because VitePress has a default for every option. It
is one of the platform schemas, which
say what a generator accepts rather than what your team agreed.
| Property | Value |
|---|---|
| Id | vitepress:page:1.6 |
| Title | VitePress front matter v1.6 |
| Files it fits | .md |
| Dialect | Draft 2020-12 |
| Required fields | None |
| Additional properties | Allowed (additionalProperties: true) |
| Reference kind | builtin |
| On by default | No |
| Upstream reference | Frontmatter config |
| JSON | vitepress/1.6.json |
Use it
Section titled “Use it”VitePress keeps pages at the repo root, so an override names the directory the schema covers:
meta: overrides: - files: "docs/**" schemas: - vitepress:page:1.6For a one-off run, pass the id directly:
manni meta validate docs/ -s vitepress:page:1.6Fields
Section titled “Fields”The four options every VitePress theme honours, plus the default theme’s page-level toggles.
| Field | Type | Notes |
|---|---|---|
title, description | string | Override the site-level values. |
titleTemplate | string | boolean | false drops the suffix. |
head | array | [tag, attrs] pairs injected into <head>. |
layout | doc | home | page | Anything else is rejected. |
hero, features | object, array | Home-layout blocks; typed but not pinned. |
outline | level | [from, to] | deep | false | 1–6. |
aside | boolean | left | |
lastUpdated | boolean | string | A flag, or a date overriding the stamp. |
navbar, sidebar, editLink, footer, isHome | boolean | Page-level toggles. |
pageClass | string |
outline is the field this schema exists for. It takes four different shapes,
and VitePress ignores a value it does not recognise rather than complaining. So
outline: 9 silently gives you the default rather than a deep outline.
Additional properties
Section titled “Additional properties”Allowed. A key VitePress does not define passes unchecked.
Versioning
Section titled “Versioning”Example page
Section titled “Example page”A page carrying the common options, at legal values. This is
test/fixtures/platform/vitepress-valid.md, and it passes.
---title: Deployingdescription: How to deploy a VitePress site.layout: docoutline: [2, 3]aside: leftlastUpdated: trueeditLink: truepageClass: deploy-pagehead: - - meta - name: robots content: noindex---A common mistake
Section titled “A common mistake”outline: 9 is not a heading level VitePress knows. It ignores the value, and
this schema reports it:
---title: Deployingoutline: 9---✗ test/fixtures/platform/vitepress-bad-outline.md /outline must be equal to one of the allowed values (line 3) [vitepress:page:1.6] /outline must match "else" schema (line 3) [vitepress:page:1.6]
1 file checked, 0 passed, 1 failed, 2 errorsBoth lines name the one field. Use a level from 1 to 6, a [from, to] pair,
deep, or false.