Expand description
§markplus_core
Universal Markdown → AST (JSON) compiler for the MarkPlus ecosystem.
§What this crate does
Parses a Markdown document (with optional YAML frontmatter) into a structured, versioned JSON AST. It does not render HTML or Typst — that is the responsibility of a downstream renderer that consumes the AST.
§Output shape
{
"schema": 1,
"meta": { "title": "...", "tags": ["..."] },
"ast": [
{ "t": "heading", "level": 1, "children": [{ "t": "text", "text": "Hi" }] },
{ "t": "fenced", "name": "mermaid", "attrs": {}, "raw": "graph TD\nA-->B" }
]
}Modules§
- ast
- Stack-based Markdown AST builder.
- config
- Parser configuration and pulldown-cmark option flags.
- docs
- Comprehensive guides and references.
- event_
filter - Frontmatter extraction layer.
- json
- Wire format for the compiled site asset (
note_XXX.json).
Enums§
- Compile
Error - Errors that can occur while compiling Markdown into a
SiteAsset.
Functions§
- parse_
body - Parse a pre-stripped Markdown body (no frontmatter) into an AST array.
- parse_
document - Parse a raw
.mdsource (may contain YAML frontmatter) into aSiteAssetcontaining parsed metadata and the full MarkPlus AST. - strip_
frontmatter - Return the Markdown body with a leading YAML frontmatter block removed.