structure atoms
Scope-level constraints on a document or block's child sections.
Scope-level atoms on a document or block directive that constrain its child sections (not the section's own content). Not field rules — they drive the structure pass.
Atoms
| Atom | Syntax | Scope | Description |
|---|---|---|---|
ordered | ordered | document, block | The declared child sections must appear in the declared relative order. |
noExtraSections | noExtraSections | document, block | Closure: every child section must be one the schema declares here — no undeclared sections. |
strict | strict | document, block | Sugar for noExtraSections + ordered: exactly the declared sections, in the declared order. |
freeText | freeText | document, block | Opt this scope out of noExtraSections/strict — arbitrary extra child sections are allowed. |
repeat | repeat / repeat=N | block | This child block's heading is a repeating pattern. Bare repeat requires ≥1; repeat=N requires ≥N. |
requiredWhen | requiredWhen.<key>=<value> / requiredWhen.checked="<label>" | block | This child block is required only when a condition holds: a frontmatter key equals a value (requiredWhen.<key>=<value>), or a matching checkbox is ticked (requiredWhen.checked="<label>"). |
Details
ordered
The declared child sections must appear in the declared relative order.
ordered · scope: document, block · src/directives/atoms.ts
<!-- mdv: document ordered -->noExtraSections
Closure: every child section must be one the schema declares here — no undeclared sections.
noExtraSections · scope: document, block · src/directives/atoms.ts
<!-- mdv: document noExtraSections -->strict
Sugar for noExtraSections + ordered: exactly the declared sections, in the declared order.
strict · scope: document, block · src/directives/atoms.ts
<!-- mdv: document strict -->freeText
Opt this scope out of noExtraSections/strict — arbitrary extra child sections are allowed.
freeText · scope: document, block · src/directives/atoms.ts
<!-- mdv: block freeText -->repeat
This child block's heading is a repeating pattern. Bare repeat requires ≥1; repeat=N requires ≥N.
repeat / repeat=N · scope: block · src/directives/atoms.ts
<!-- mdv: block required repeat=2 -->requiredWhen
This child block is required only when a condition holds: a frontmatter key equals a value (requiredWhen.<key>=<value>), or a matching checkbox is ticked (requiredWhen.checked="<label>").
requiredWhen.<key>=<value> / requiredWhen.checked="<label>" · scope: block · src/directives/atoms.ts
<!-- mdv: block requiredWhen.checked="Breaking change" -->