Skip to content

docmeta

Validate the presence and format of document metadata against JSON Schema — built for CI.

docmeta checks that your documents carry the metadata your tooling depends on — that every page declares a type, that timestamps are real dates, that required fields are actually present — and it fails your build when they aren’t. It reads the frontmatter or headers from your files, validates them against a JSON Schema, and reports what’s missing or malformed.

It validates the presence and format of metadata. It does not grade your prose, check your spelling, or judge your content. If your schema says every page needs a title and an ISO 8601 timestamp, docmeta enforces exactly that and nothing more.

You don’t need to install anything to try it. Point docmeta at a Markdown file:

Terminal window
npx docmeta validate path/to/your-doc.md

A file with complete, well-formed metadata passes:

✓ path/to/your-doc.md
1 file checked, 1 passed, 0 failed, 0 errors

A file that’s missing a required field fails, and tells you which field, on which line, and which schema flagged it:

✗ path/to/your-doc.md
(root) must have required property 'type' [google:okf:0.1]
1 file checked, 0 passed, 1 failed, 1 error

That’s the whole loop: run it, read the result, fix the field, run it again. With no schema configured, docmeta validates against its built-in OKF schema, which requires only type.

What docmeta checks — and what it doesn’t

Section titled “What docmeta checks — and what it doesn’t”

It checks

Required fields are present. Values match the format your schema declares (uri, date-time, enums, types). Metadata stays consistent as your repo grows.

It doesn't

Grade writing quality, check grammar or links, render your docs, or care about anything below the frontmatter. Metadata in, pass/fail out.

New here? The Get started page installs docmeta and walks you through your first passing and failing result in under a minute.