Switching config for dev/stage/prod, but DRY?

I’m struggling to find a way to switch configurations for dev vs staging vs prod, but the only thing I can find is --config, which means duplicating a lot of config.toml when only a few things need to change. I also don’t think TOML supports including other config files.

Am I missing something?

Can you outline what it is you want to do differently in the various environments? TBH I think most of us just use zola serve for dev and don’t bother with staging.

I’m rewriting URLs for CDN when deployed, and I’m deploying to a staging server to share with others while not affecting the production server. Both prod and staging differ only in their base URL and CDN URLs. What would be ideal is to be able to specify more than one config file, with later config files overriding any values set in previous config files. e.g.: --config config.toml, config.stage.toml

Isn’t that exactly why there is the --base-url flag? You can handle the CDN url in the template directly in an if or something

CDN and base URL are not always the same thing. On my site, only assets are served from the CDN. The root files are all served from the webserver.