Use variable tokens in content
This feature requires the Team capability tier (the Team or Business ). During the beta, every project is on the free Solo tier, so this feature is locked by default: go to Settings ▸ Billing and request Team access to unlock it.
Variable tokens are placeholders that resolve to different values depending on which Create variable sets the Publication target settings uses.
Before you begin
Create variable sets: you need at least one variable set with keys defined before inserting tokens.
Insert a variable token
Open a topic in the editor.
Place your cursor where you want the variable value to appear.
Click the variable icon ("Insert variable") in the editor toolbar.
In the Insert variable dialog, type in the Search variables... field to filter, then select the variable key (for example,
product_name).A styled pill appears showing the key name.
If no variables exist yet, the dialog shows an Add variables in Configure link. See Create variable sets.
How tokens display
In the editor: Variable tokens appear as colored pills showing the key name (for example,
product_name).On the published site: Tokens are replaced with the value from the target's variable set (for example, "Acme Pro").
For a variable set like this:
{
"product_name": "Acme Pro",
"support_email": "help@acme.com",
"api_base_url": "https://api.acme.com"
}Every product_name token across your topics resolves to "Acme Pro" when publishing with this set.
Use tokens in running text
Variable tokens work inline. You can write:
Welcome to
product_name. For support, emailsupport_email.
This renders as "Welcome to Acme Pro. For support, email help@acme.com." on the published site, with the actual values coming from the selected variable set.
Variable tokens can appear anywhere in a topic: headings, paragraphs, list items, table cells, and callout blocks. They cannot appear in image alt text or link URLs. For dynamic URLs, use a variable for the full URL in the link text and destination.
Handling missing variables
If a variable token references a key that does not exist in the selected variable set, the token renders as the raw key name. The Content health and governance system flags this as an undefined variable.
To avoid this, ensure every variable set contains all the keys used across your topics.
If a variable has no value in the project's variable sets, the key name appears in square brackets (for example, [product_name]) as literal text in the published output. The system flags undefined variables. Review the content health dashboard before publishing to catch these.
See also
Create variable sets: define the key-value pairs that tokens resolve to
Override variables for each target: change specific values without a new set
Conditions versus variables: when to use tokens versus conditional blocks
The publishing pipeline: how tokens are resolved during publish
Editor slash commands: full list of editor slash commands