Combining Tokens
SSI processes steps in order. Each step’s output becomes the next step’s input. This page demonstrates two patterns: key construction (earlier steps build keys that later steps look up) and two-pass resolution (blocks inject tokens that a second pass of the same sources then resolves).
Day/Night Theme (Two Levels)
This page's body element has a theme class selected at build time.
The step chain: datetime resolves the AM/PM token, then data looks
up the corresponding theme name (light or dark).
- Datetime step:
am_pmtoken resolves toAMorPM - Data step:
theme_AMortheme_PMresolves tolightordark - Result:
class="theme-light"orclass="theme-dark"
The theme indicator in the header shows which was applied.
Time-Selected Hero (Three Levels)
The hero section below was selected by a three-step token chain. The page template has a single token that chains through datetime, then data, then blocks — selecting a completely different section at build time.
Good Evening!
The day is winding down. Review what you built today.
20:58:34 — 2026-06-08
Branch + Time Greeting (Three Levels)
Good evening! Production is live.
The greeting above is constructed from three inputs: git provides the
branch name, datetime provides AM/PM, and data maps the combination to
text. On main or dev branches the greeting
resolves fully. On other branches it shows the constructed key — which
is itself educational.
Build Info (Simple, No Composition)
Built from main (4915a3ae16)
on 2026-06-08 at 20:58:34
No composition needed here — just git and datetime tokens used directly. These resolve in the early pass, before blocks even run.
The Pipeline Config
The step ordering is the key to token composition. Here is the actual
ssi-config.toml for this site — eight steps in two passes:
# Pipeline: Pages → Git(🔧) → DateTime1(🕐) → Data1(📊) → Blocks(🪩)
# → DateTime2(⏰) → Data2(📈) → Assets
[[step]]
emoji = "📄"
processing = "page"
path = "pages/"
options = ["leftovers-okay"]
[[step]]
emoji = "🎨"
processing = "copy"
path = "assets/"
# === EARLY PASS ===
[[step]]
emoji = "🔧"
processing = "include"
type = "git"
path = "../../../.git/"
options = ["inline", "allow-external-paths"]
[[step]]
emoji = "🕐"
processing = "include"
type = "datetime"
options = ["inline"]
[[step]]
emoji = "📊"
processing = "include"
type = "plain"
path = "data/content.toml"
options = ["inline", "leftovers-okay"]
[[step]]
emoji = "🪩"
processing = "include"
type = "html"
path = "blocks/"
options = ["leftovers-okay"]
# === LATE PASS ===
[[step]]
emoji = "⏰"
processing = "include"
type = "datetime"
options = ["inline"]
[[step]]
emoji = "📈"
processing = "include"
type = "plain"
path = "data/content.toml"
options = ["inline", "leftovers-okay"]
The Data File
All token composition happens through data/content.toml.
Earlier steps produce values that become keys in this file; two data steps
(one early, one late) look up those keys and replace them with the
mapped values:
[_]
# Day/night theme selection
theme_AM = "light"
theme_PM = "dark"
# Hero block selection — value becomes a block token name
hero_AM = "hero-sunrise"
hero_PM = "hero-sunset"
# Crazy-town: card style selection
card_style_AM = "card-bright"
card_style_PM = "card-muted"
# Branch + time greeting (key constructed from branch + am_pm)
greeting_mainAM = "Good morning! Production is live."
greeting_mainPM = "Good evening! Production is live."
# Daily tip for each day of week (resolved in late pass from block content)
tip_title_Mon = "Monday: Start fresh."
tip_content_Mon = "Begin the week with a clear plan."
# ... (one entry per day)