MeDiVa
DocsReference

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

AtomSyntaxScopeDescription
orderedordereddocument, blockThe declared child sections must appear in the declared relative order.
noExtraSectionsnoExtraSectionsdocument, blockClosure: every child section must be one the schema declares here — no undeclared sections.
strictstrictdocument, blockSugar for noExtraSections + ordered: exactly the declared sections, in the declared order.
freeTextfreeTextdocument, blockOpt this scope out of noExtraSections/strict — arbitrary extra child sections are allowed.
repeatrepeat / repeat=NblockThis child block's heading is a repeating pattern. Bare repeat requires ≥1; repeat=N requires ≥N.
requiredWhenrequiredWhen.&lt;key>=&lt;value> / requiredWhen.checked="&lt;label>"blockThis 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" -->

On this page