Variables

A variable is a named value you define once and reuse across pages: a product name, a version, or a support address. Change the value in one place, and every page that uses it updates on the next build. The stable variable name is in root definitions/variables.yml; the selected locale's value is in content/<locale>/definitions/variables.yml.

Define

# definitions/variables.yml
variables:
  - name: product-name
  - name: min-ide-version

# content/en/definitions/variables.yml
variables:
  - name: product-name
    value: Codocation
  - name: min-ide-version
    value: "2026.1"

The default locale must provide every root variable. A non-default locale may override only the translated payload and falls back by stable name when it omits one.

Use

Reference a variable anywhere in a page body as {{name}}:

{{product-name}} requires IntelliJ IDEA {{min-ide-version}} or newer.

The value is substituted when the page is rendered: in the preview, on the built site, in the PDF, and in search results and excerpts. Substitution reaches body text, headings, links, and code alike - fenced blocks and inline spans included, because a sample that shows the wrong version is as wrong as a sentence that does. A {{name}} that matches no defined variable stays literal so a typo remains visible. Escape a defined variable as {{name}} when literal text is required.

A block that must show the reference itself rather than its value says so:

```yaml {variables="false"}
product: {{product-name}}
```

Write `{{product-name}}`{variables="false"} to substitute the product name.

Inside such a carrier nothing at all is rewritten - the {{name}} escape keeps its backslash too, since an escape would corrupt the very sample the reader is meant to copy. See Markdown Extensions.

The editor marks variable usages in the gutter, so you can see at a glance where a value is reused. Renaming a variable updates its stable ID and all supported {{name}} references as a single refactoring.