Get started
This page takes a docset from a concepts: field that can say anything to one
whose every value names a defined term. You’ll write two term pages, list
them, and reference them from a guide. Then you’ll run the check, read the
finding, and fix it.
Every transcript below is real output from the built tool, run over the
fixtures in test/fixtures/term/cli/.
Before you start
Section titled “Before you start”- Node.js 24 or newer. Check with
node --version. - A docset with frontmatter. The pages here are Markdown. A term page works the same way in every format manni meta reads.
manni term ships in the same package as manni meta.
npx @hawkeyexl/manni term --helpnpm install -g @hawkeyexl/mannimanni term --helpWrite the terms
Section titled “Write the terms”-
Write one page per term.
type: termmarks the page.labelis the preferred name, anddefinitionsays what it means. The other fields are optional:docs/terms/corrective-lens.md ---type: termid: corrective-lenslabel: corrective lensnarrower: [progressive lens]definition: A lens worn to correct a refractive error of the eye.---docs/terms/progressive-lens.md ---type: termid: progressive-lenslabel: progressive lensalt-labels: [PAL, graduated lens]hidden-labels: [no-line bifocal]broader: [corrective lens]abstract: Lenses that correct presbyopia without a visible line.definition: >-Corrective lenses whose optical power increases continuously from the top ofthe lens to the bottom, correcting presbyopia without the visible boundary abifocal carries.---alt-labelsare other names a writer may use.hidden-labelsare names nobody should. Every field is on the terminology reference. -
Declare the docset as a collection. The family config file names the documents once, for every tool:
manni.config.yaml collections:- name: sitepaths:- "docs/**/*.md"No
term:section is needed. The terms are the pages that saytype: term, wherever they sit. -
List what the tool found.
Terminal window manni term listcorrective-lens corrective lensprogressive-lens progressive lens PAL, graduated lens2 terms
Reference a term from a guide
Section titled “Reference a term from a guide”concepts: on any page says which terms the page is about. Its values are
preferred labels:
---title: Fitting lensesconcepts: [PAL, corrective lens, progressive lens]---# Fitting lenses-
Run the check.
Terminal window manni term checkdocs/guides/fitting.md:3error manni:term/undefined-term concepts: "PAL" names no entry."progressive lens" lists it as an alt-label.1 error in 2 termsThe exit code is
1.PALis a name the set knows, butconcepts:wants the preferred label, so the message says which entry claims it. -
Fix the reference. The guide already names
progressive lens, so the alt-label is a duplicate. Remove it:docs/guides/fitting.md ---title: Fitting lensesconcepts: [progressive lens, corrective lens]---# Fitting lenses -
Check again.
✓ 2 terms, 2 references, no findingsThe exit code is
0.
Add a term nothing uses yet
Section titled “Add a term nothing uses yet”A termbase grows ahead of the pages. Add a third term, a child of
corrective lens:
---type: termid: bifocallabel: bifocalbroader: [corrective lens]definition: Lenses with two distinct optical powers, divided by a visible line.---docs/terms/bifocal.md:1 notice manni:term/unused-term no page's concepts: names this termdocs/terms/corrective-lens.md:5 warning manni:term/asymmetric-hierarchy narrower: omits "bifocal", which lists this entry as broader
1 warning, 1 notice in 3 termsNeither finding fails the run, and the exit code is 0. The warning names the
line to change. Add bifocal to the narrower list of corrective lens, and
the warning goes:
docs/terms/bifocal.md:1 notice manni:term/unused-term no page's concepts: names this term
1 notice in 3 termsThe notice stays until a page names bifocal in its concepts:. A set written
ahead of its pages can turn it off with severity: {unused-term: off} under
term:.