Skip to main content

Module loaders

Module loaders 

Source
Expand description

Per-extension loaders: bytes -> Loaded { data, content } for schema validation. MatterLoader runs the full mdx compile; YamlLoader / JsonLoader parse data files directly.

Structs§

JsonLoader
.json loader. Straight serde_json::from_str.
Loaded
One loaded source file: schema-validated data (frontmatter for mdx, the whole doc for yaml/json) plus the original content string.
LoaderRegistry
Ordered loader chain; first match wins. Defaults: Matter, Yaml, Json.
MatterLoader
.md / .mdx / .markdown loader. Runs the full compile and stashes the CompileOutput under data.__compiled so the schema can refine it (e.g. transform: ctx => ctx.html).
YamlLoader
.yaml / .yml loader. Parses to serde_yaml::Value, then converts to serde_json::Value for schema interop.

Traits§

Loader
Pluggable per-extension loader: test claims a path, load parses it.