I’m trying to find a way to condition my build using configuration variables. More precisely I want to copy either robots-production.txt or robots-dev.txt to robots.txt if the URL is equal to mysite.com. I want to avoid creating a special branch and since the url needs to be static using deploy preview is not an alternative.
Is it possible to achieve this using netlify.toml?
URL is listed under “Deploy URLs and metadata” in “Build environment variables” in the docs. That should give me access to the url in netlify.toml but I can’t figure out the syntax.
Two different. One is production and the other is for Storyblok preview. The latter should not be indexed and therefore I need to use different robots.txt for the different builds. I could solve this by using a different branch for the preview, easy to set up in netlify.toml but I want to avoid this.
Does the “no” mean that I cannot access the URL variable in netlify.toml?