Explanation

Explanation

Deep dives into datamark's architecture, design decisions, and internals. These pages explain why things work the way they do — useful when you want to understand the system beyond just using it.

Design principles

  • Zero bundled dependencies — You bring your own validator (Zod, Valibot, etc.). No lock-in.
  • Unified node typeNode is the base for everything. Sections, blocks, and inlines share the same traversal API.
  • Native section tree — Headings are section boundaries in the AST, not just block nodes. This makes document navigation natural.
  • Type inference from schemas — Both frontmatterSchema and schema infer their output types via the Standard Schema interface. No manual type annotations needed.
  • Validation before execution — Frontmatter is validated before parse() runs. Output is validated after. Your functions never see invalid data.

On this page