I have a current application which is located at “cp-com-3.netlify.com” its a Gatsby/Wordpress headless app. The wordpress site is hosted at another party.
We want to localize this application for another geographic region, to do that we are standing up another headless Wordpress site, and creating a new “site” inside of netlify. Inside of our sites ENV file we are trying to tell each environment where to get its content.
Because ideally we have one codebase to support both these sites, I want to know is there a way inside of the TOML to distinguish which netlify “SITE_ID” the TOML is inside of? OR can I set an environment variable at the site level and then inside the TOML use that to change the source of the content.
configure everything obvious in the toml file. These would be all the settings that are the same for both sites (e.g. build command, API endpoints, etc).
NOT configure the specific environment variable that controls the language in the toml file
then, make a second site, linked to the same repo as the first.
instead, configure that or those language-specific variable(s) in each site’s environment variable settings. (That’s on the build & deploy settings page about halfway down).
You get:
“templated” site with all common config in netlify.toml