Lumio Theme Documentation
Generated Config From TOML
One of the biggest beginner pain points in Lumio is that src/config/config.toml is not read directly everywhere.
Instead, Lumio converts it into a generated JSON file:
- source:
src/config/config.toml - generated output:
.astro/config.generated.json
Why This Exists
A lot of Lumio code imports config like this:
import config from ".astro/config.generated.json";This makes the config easy to consume from Astro components, utilities, and scripts without reparsing TOML everywhere.
How It Gets Generated
The build helper is:
scripts/toml-watcher.mjs
It:
- reads
src/config/config.toml - parses it with
toml - writes
.astro/config.generated.json - watches the TOML file in dev mode
Relevant script commands from package.json:
"dev": "npm run toml:watch -- --watch & astro dev","build": "npm run toml:watch && astro build && npm run remove-draft-from-sitemap","toml:watch": "node scripts/toml-watcher.mjs"What This Means In Practice
In development
npm run dev starts Astro and the TOML watcher together, so changes to config.toml regenerate the JSON automatically.
In production build
npm run build regenerates the JSON first, then runs Astro build.
Common Confusion
If you edit config.toml but don’t see the expected change:
- make sure you started the project with
npm run dev - check that
.astro/config.generated.jsonwas regenerated - restart dev if the watcher or editor replacement behavior got interrupted
Rule Of Thumb
- Edit
src/config/config.toml - Never manually edit
.astro/config.generated.json
The generated JSON is an output artifact, not the source of truth.