Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

Markdown snippets

<Markdown> (aliases <Snippet>, <Include>) inserts a reusable snippet file.

Inserts a reusable snippet file into the page (aliases <Snippet>, <Include>). Any extra props replace placeholders in the snippet:

<Markdown src="/snippets/install-cli.mdx" />
<Snippet file="node-requirement.mdx" node="22.13" cli="0.1.0" />
环境要求 · Requirements

Node.js ≥ 22.13 · biti --version ≥ 0.1.0

srcstring
Snippet path (file and path also work): /snippets/x.mdx is relative to the project root, ./x.mdx is relative to the current file, and a bare file name is looked up under snippets/ at the project root.
Other propsstring | number
Replace \{name\} placeholders in the snippet body.

A missing snippet raises a snippet/missing error. For path rules, import syntax, and escaping requirements for placeholders, see Reusable snippets and variables.