Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Ankur Sheel
Ankur Sheel

Posted on • Originally published atankursheel.com on

How to override the netlify build config

Problem

As part of themigration from Gatsby to Statiq, I wanted to keep the original site running with gatsby but deploy the new branch using Statiq.

Solution

First, we need to allow branch deploys for our branch.
Netlify UI

In the above screenshot, my branch for the migration is namedstatiq.

To override the build settings set in the Netlify UI, we can add the following snippet tonetlify.toml

[build]command="dotnet run --project ./subDir/"publish="./subDir/output"
Enter fullscreen modeExit fullscreen mode

So, what’s happening here?

  • Line 1 : Apply the build settings globally and override anything set in the UI.
  • Line 2 : Use thedotnet run as 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.

Conclusion

The advantage of updating thenetlify.toml file is that when we merge our branch back to master, it will automatically use Statiq to build the site.

References:

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

More fromAnkur Sheel

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp