Skip to content

Create variable sets

Variable sets hold key-value pairs that resolve at publish time. Different sets let you substitute different values per Publication target settings — product names, URLs, version numbers, or any text that varies between outputs.

Create a variable set

  1. Go to Variables in the sidebar.

  2. Click New Variable Set.

  3. Name the set — e.g., "Pro Edition" or "Production."

Add variables to a set

  1. Open the variable set.

  2. Click Add Variable.

  3. Enter a key (e.g., product_name) and a value (e.g., "Acme Pro").

  4. Add more key-value pairs as needed.

Common variables:

Key

Example value

Use for

product_name

"Acme Pro"

Product name throughout docs

support_email

"help@acme.com"

Contact information

api_base_url

"https://api.acme.com"

API endpoint references

version

"3.2"

Version numbers

A variable set is stored as a JSON structure:

{
  "product_name": "Acme Pro",
  "support_email": "help@acme.com",
  "api_base_url": "https://api.acme.com"
}

Use consistent, descriptive key names across all your variable sets. Stick to snake_case — it's easier to read in the editor pill and avoids issues with spaces or special characters.

Set the default

One variable set per project can be marked as the default. This set is preselected when creating new publication targets.

  1. On the Variables page, click the star icon next to the set you want as the default.

Create multiple sets

Create one set per output variant:

  • "Pro Edition" with product_name = "Acme Pro"

  • "Enterprise Edition" with product_name = "Acme Enterprise"

Both sets should contain the same keys so that every Use variable tokens in content resolves in every output. If a key is missing from a set, the token renders as the raw key name on the published site.

If a variable key is missing from the target's variable set, the raw key name (e.g., product_name) appears as literal text in the published output. The system flags undefined variables — review the content health dashboard before publishing to catch these.

If a target only needs one or two values changed from an existing set, use Override variables per target instead of creating an entirely new set.


See also

Was this page helpful?