As part of the migration from Gatsby to Statiq, I wanted to keep the original site running with gatsby but deploy the new branch using Statiq.
In the above screenshot, my branch for the migration is named statiq.
To override the build settings set in the Netlify UI, we can add the following snippet to netlify.toml
command = "dotnet run --project ./subDir/"
publish = "./subDir/output"
So, what’s happening here?
- Line 1 : Apply the build settings globally and override anything set in the UI.
Line 2 : Use the
dotnet runas the build command and specify the project path.
- Line 3 : The relative directory to the root directory containing the deploy-ready HTML files and assets.
The advantage of updating the netlify.toml file is that when we merge our branch back to master, it will automatically use Statiq to build the site.