Stand up metadata validation for your repo
You own a docs repo, and you want every page to carry correct, complete frontmatter so search and your content catalog stay trustworthy. This guide threads the whole setup together. Install manni meta, validate a folder by hand, then capture your rules in a manni.config.yaml. Then land a CI gate that runs the same check on every pull request.
By the end you will have a committed config file and a check that fails the build when a doc is missing required metadata.
Before you start
Section titled “Before you start”- Node.js 24 or newer. Check with
node --version. - A docs repo with frontmatter you want to enforce. The examples below assume Markdown under a
docs/folder, but manni meta handles other formats too; see the supported formats reference.
Stand it up
Section titled “Stand it up”-
Validate a folder, no setup required.
Run manni meta against a directory with
npx. No install, no config. This tells you where you stand today.Terminal window npx @hawkeyexl/manni meta validate docs/manni meta walks
docs/, finds every supported file, and validates each one against the built-ingoogle:okf:0.1schema, which requires atypefield. You will see a pass/fail line per file and a summary. A nonzero exit code means at least one file failed. -
Add a
manni.config.yamlat your repo root.The command above works, but you do not want to retype paths and schemas every run. CI also needs a stored definition of what “valid” means for your repo. Capture it in a config file so a bare
manni meta validateknows what to do.manni.config.yaml # Which documents exist. Every manni tool reads this.collections:- name: pagespaths:- "docs/**/*.md"# How the metadata tool judges them.meta:# The schema set every matched file must satisfy.schemas:- google:okf:0.1The file has two halves. A top-level
collections:list declares your document sets, once, for every tool undermanni. A baremanni meta validatereads them all when you name no files on the command line.meta.schemasis the set each file is validated against; every file must satisfy every schema you list.Create your manni.config.yamlBoth halves explained: collections with their paths and exclusions, then schemas and overrides, with a complete worked example. -
Run the stored configuration.
With the config committed, you no longer pass paths or schemas. manni meta discovers
manni.config.yamlin the current directory, reads every collection it declares, and appliesmeta.schemas.Terminal window npx @hawkeyexl/manni meta validateThis is the exact command CI will run. Confirm it reports what you expect locally before you wire it up.
-
Land the CI gate.
The same
npx @hawkeyexl/manni meta validatecommand becomes a pull-request gate. manni meta exits0when everything passes and1when a file fails validation, so any CI system can use it as a pass/fail step. The--format githubflag turns failures into inline annotations on the PR diff.Terminal window npx -y @hawkeyexl/manni meta validate --format githubThe full recipe (workflow file, exit-code contract, and annotation behavior) lives in the CI track. Copy the ready-made recipe there instead of assembling your own.
Run it in CIReady-made recipes for GitHub Actions, GitLab CI, Jenkins, and pre-commit, plus the exit-code and annotation contract.
What you have now
Section titled “What you have now”A committed manni.config.yaml whose collections: list defines which documents exist, and whose meta: section defines the schema they must satisfy. Plus a CI step that runs the same check on every pull request, and fails the build on bad metadata. New contributors get the same enforcement you do, without any review fatigue on your side.