# Variables

> For the complete documentation index, see [llms.txt](https://preview.writedocs.io/llms.txt).

Write a product name, a version or an email address once in writedocs.json, and use it in every page.

Text that appears in many pages and changes now and then - a product name, the latest version, a support address - can be written once, in `writedocs.json`'s `variables`:

```json
{
  "variables": {
    "productName": "Acme",
    "latestVersion": "4.2.0",
    "supportEmail": "support@acme.com"
  }
}
```

and used in any page as `[[name]]`:

```mdx
Welcome to [[productName]]. The latest version is [[latestVersion]] -
questions go to [[supportEmail]].
```

Change the value in `writedocs.json`, and every page that uses it changes.

## Rules

- Names are made of letters, digits, `_`, `-` and `.`, and are case-sensitive: `[[productName]]` and `[[productname]]` are different variables.
- Values are plain text.
- A `[[name]]` with no variable of that name stays as written, so a typo is easy to spot on the page.
- In code, `[[name]]` is never replaced - both in `` `inline code` `` and in code blocks. To show a value in code, write it out.

Variables are replaced in the page's Markdown copy, `llms-full.txt` and the MCP server too, so AI tools read the same text as people do.

## Where they work

Variables are replaced in the page's text, including text inside components:

```mdx
<Callout type="info">[[productName]] keeps your data for 30 days.</Callout>
```

They aren't replaced in a component's props - `<Card title="[[productName]]">` - or in frontmatter, like the `title`.