Taxo Theme Documentation
Generated Config From TOML
Taxo generates a config file from src/config/config.toml so the theme can use
those settings consistently during development and builds.
The two important files are:
- source:
src/config/config.toml - output:
.astro/config.generated.json
Many files import the generated JSON:
import config from ".astro/config.generated.json";Why Taxo Uses This File
This keeps config access simple across:
- Astro layouts
- utility functions
- page routes
- scripts
How It Gets Generated
The script is:
scripts/toml-watcher.mjs
And these commands depend on it:
{ "dev": "npm run toml:watch -- --watch & astro dev", "build": "npm run toml:watch && astro build && npm run remove-draft-from-sitemap", "astro-check": "npm run toml:watch & astro check", "toml:watch": "node scripts/toml-watcher.mjs"}What This Means In Practice
npm run devwatches TOML changes and regenerates config automaticallynpm run buildregenerates config before the production buildnpm run astro-checkalso starts the watcher first
If Changes Do Not Appear
If you update config.toml and do not see the result:
- make sure you started the project with
npm run dev - confirm
.astro/config.generated.jsonchanged - restart the dev server after multilingual routing changes
Rule Of Thumb
- edit
src/config/config.toml - never manually edit
.astro/config.generated.json