Skip to content
Type something to search...
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 dev watches TOML changes and regenerates config automatically
  • npm run build regenerates config before the production build
  • npm run astro-check also starts the watcher first

If Changes Do Not Appear

If you update config.toml and do not see the result:

  1. make sure you started the project with npm run dev
  2. confirm .astro/config.generated.json changed
  3. restart the dev server after multilingual routing changes

Rule Of Thumb

  • edit src/config/config.toml
  • never manually edit .astro/config.generated.json