Netlify
fallbackMessage
docmd deploy --netlify generates a netlify.toml file at the root of your project, pre-configured with the correct build command, publish directory, cache headers, and SPA redirects.
docmd deploy --netlify
What Gets Generated
The netlify.toml configures:
- Build command — installs
@docmd/coreand runsdocmd build - Publish directory — set to your configured
outdirectory - Node version — pinned to Node 20
- Cache headers — immutable for assets, no-cache for HTML pages
- SPA redirects — a
/*→/index.htmlrewrite whenlayout.spais enabled
Deploying
Connect your repository to Netlify from the Netlify dashboard. It will pick up the netlify.toml automatically and deploy on every push.
Alternatively, use the Netlify CLI:
npm install -g netlify-cli
netlify deploy --prod
Re-generating
Re-run docmd deploy --netlify any time you change out or other relevant config fields to keep netlify.toml in sync.