Feature
Snippets and variables
Write a fragment once and embed it anywhere. Tokens resolve from owndocs.config.json as the page renders, fenced code blocks included.
- A Snippet tag with a path attribute drops a shared MDX fragment into the page. Edit snippets/install-note.mdx once and every page that embeds it changes.
- A path that climbs out of the snippets directory never reaches the disk. The page renders an amber warning box naming the bad path instead of breaking the build.
- A snippet runs the same remark and rehype pipeline as a full page, so all 25 documentation components, GitHub alerts, and KaTeX math work inside one.
- A {{vars.apiUrl}} token resolves from the vars block in owndocs.config.json while the page renders, so one edit updates every page that names it.
- Substitution reaches inside fenced code blocks and inline code, not just prose. A name you never configured stays on the page as written rather than collapsing to a blank.
Our documentation site is built with OwnDocs, running the same code you receive.