Expand description
Wire format for the compiled site asset (note_XXX.json).
SiteAsset is the top-level output of crate::parse_document.
It contains:
schema— integer version so renderers can detect breaking changes.meta— parsed YAML frontmatter as a JSON value tree (native only).ast— array of MarkPlus block nodes (seecrate::ast).
Structs§
- Schema
Version - Site
Asset - The JSON asset written to
dist/static_api/note_XXX.json.
Functions§
- parse_
json_ data_ to_ ast - Parse a JSON data string and return AST block nodes.
- read_
and_ validate_ asset - Read a JSON file from
path, validate it with the lightweight checker, and deserialize into aSiteAsset. Returns Err(String) on any failure. - read_
asset_ json - Read a JSON file and return the parsed JSON
Valuewithout validation. Convenience wrapper for callers that only need the raw JSON tree. - read_
json_ data_ as_ ast - Read a JSON data file and return AST block nodes.
- validate_
asset_ json_ str - Lightweight validation of the SiteAsset JSON string.
- validate_
asset_ json_ value - Validate a parsed JSON
Valuerepresenting a SiteAsset wire format.