Sätteri 0.10
@fumadocs/satteri now requires satteri ^0.10.3, and the plugins were rewritten on its new capabilities:
- Exports (
frontmatter,toc,structuredData, …) are emitted by anafterdocument hook instead of an anchor marker appended to the source, so plugins no longer see (or need to skip) the anchor node. remark-steps,remark-admonitionandremark-code-tabstill detect their targets through node visitors (so documents without the construct cost nothing), but process each parent exactly once in anafterhook, replacing the per-visit dedup workarounds.remark-llmsstringifies the document root from abeforehook instead of subscribing to 19 node types to find it.- Markdown documents compile through Sätteri's own
markdownToJs; the hand-assembled pipeline is gone. Raw HTML in.mdfiles is still dropped, matching the previous behavior. rehype-katexparses KaTeX output with Sätteri'shtmlToHast, dropping thehast-util-from-htmldependency.- No plugin reads
node.position, so Sätteri now skips source-position tracking entirely (~15% faster parse).
Breaking: ExtraPluginHooks.beforeToJs was removed. Seed ctx.data from a Sätteri before hook on the plugin definition instead — it also receives the document root:
import { defineMdastPlugin } from 'satteri';
defineMdastPlugin({
name: 'my-plugin',
before(root, ctx) {
ctx.data.myValue ??= [];
},
});