Parse & alter AST (Markdown syntax, frontmatter, links).
ObsidianFlavoredMarkdown, CrawlLinks
๐งน Filters
Prune content (exclude drafts and non-published files).
Drafts, ExplicitPublish
๐ค Emitters
Compile & write static assets, search indices, and graphs.
Pagefind, GraphView, Static
๐ก Best Practices
โจ HAST Shallow-cloning: Utilize Object.assign({}, node) during AST transformations. This avoids the severe memory overhead of deep cloning massive unified/rehype trees.
โจ Native Canvas Rendering: Drop raw .canvas files directly into your content directory. The Quartz integration natively handles interactive panning and zooming.
โจ Concurrent Emitters: Design all custom emitters as pure functions without shared mutable state. Concurrent pipeline execution drastically reduces build times (see 01-Configuration for pipeline setup).
๐จ Gotchas & Warnings
โ ๏ธ Deep Cloning AST: NEVER deep clone HAST trees during transformation passes. This neutralizes optimizations and causes extreme memory bloat.
โ ๏ธ Mutating Shared HAST Children: Do not mutate nested node.children directly if the node was only shallow-cloned. Always create a new children array for structural changes.
โ ๏ธ Canvas Manual Export: DO NOT manually export Obsidian Canvases to PNG, PDF, or raw HTML. It creates stale data silos and breaks the SSOT architecture.
โ ๏ธ Blocking Emitters: AVOID heavy synchronous fs operations in emitters. Blocking the Node.js event loop destroys concurrent pipeline throughput.