Variables
Define a value once in blume.config.ts and write {{name}} anywhere a page needs it, in prose, code, links, and component props.
Define a value once and use it across every page. A version number, an API host, or a product name lives in blume.config.ts, and {{name}} in a page reads its value:
export default defineConfig({
variables: {
version: "2.1.0",
"api-url": "https://api.example.com",
},
});
Install version {{version}}, then call {{api-url}}.
## What's new in {{version}}
<Card title="Release {{version}}" href="{{api-url}}/changelog" />
References work in prose, headings, links, code blocks, inline code, and component props, in .md and .mdx pages and in the files they include. Spaces inside the braces are fine ({{ version }}). Change the value in the config and every page picks it up on the next build.
Names take letters, digits, _, and -. Values are plain text on one line.
Where they apply
A variable is replaced before anything reads the page, so the rendered HTML, search, the page’s .md mirror, and llms-full.txt all show the value.
Front matter is left as written: a title or description with {{version}} in it shows the braces.
Undefined names
A {{name}} that isn’t defined in prose is a build error, BLUME_UNDEFINED_VARIABLE, reported at its line, so a typo never reaches readers. Inside a code block or inline code, an undefined name is left as written, since templating examples like a Handlebars {{title}} are common there.
To show a reference in prose without defining it, put it in inline code: `{{name}}`.
A site that defines no variables is unaffected: {{…}} in its pages stays as written.