Skip to main content
OwnDocs

Variables

1 min readStableIntermediate

Build-time {{vars.x}} placeholders resolve from owndocs.config.json or NEXT_PUBLIC_DOCS_VAR_* environment variables.

Quick Start

A single variable in inline code.

The API base URL is https://api.example.com.

Adding Options

Multiple variables in inline code.

The API base URL is https://api.example.com. For support, email support@example.com.

Advanced

Variables inside a fenced code block.

MDX
MDX
Welcome to OwnDocs version 1.0.0.

The rendered output reads: "Welcome to OwnDocs version 1.0.0."

Options

{{vars.x}}token

Resolves from config or env var inside inline code or a fenced code block. Plain prose does not work: MDX parses {...} as an expression before the plugin runs.

\{{vars.x}}escaped

Keeps the token literal inside inline code or a fenced code block. In plain prose the backslash is consumed by MDX and the braces render empty, so show a literal token with inline code instead.

Was this page helpful?