Content tokens are shared values — like the project tagline — defined once and reused across the site so they can't drift out of sync. The source of truth is a single plain-YAML file, src/content/tokens/tokens.yaml, read in code via getToken("id") (see src/config/tokens.ts).
The source file
Section titled “The source file”This is the actual contents of tokens.yaml, read from the real file at build time (so it can never drift from what's shown here). It's rendered via a Markdoc tag — the Keystatic-safe, import-free way to embed live source:
# Content tokens — shared values defined once and reused across the site so they# stay in sync. Each top-level key is a token id; `value` is what renders and# `description` explains where/why it is used. Read in code via getEntry("tokens", "<id>")# (see src/config/tokens.ts) and shown live on the Content Tokens page (src/content/docs/tokens.mdoc).## This is a plain YAML data file (an Astro "data" content collection via the# file() loader) so it round-trips through Keystatic and contains no ESM/JSX/MDX.# To add a token: add a new key below with `value` and `description`, then read it# in code with getEntry("tokens", "your-key").tagline: value: Rebuilding Drupal's community Groups platform on Modern Drupal. description: One-line project tagline. Shown in the homepage hero and the site footer.The title bar above shows the file's location in the repo. Everything you need is in that file — each token's value and a description of where it's used — so this page shows the real thing rather than a copy that could fall out of date.
How to add a token
Section titled “How to add a token”- Add a new top-level key to
src/content/tokens/tokens.yamlwith avalue(what renders) and adescription(where and why it's used). - Read it in
.astrocode withgetToken("your-key")fromsrc/config/tokens.ts, or usegetEntry("tokens", "your-key")directly. - Rebuild — the YAML block above shows it automatically, and an unknown key fails the build loudly.
