How to use
- Fill in Publish directory, Node version for Netlifytoml.
- To match “Publish dist on Node 22”, enter Publish directory dist; Node version 22.
- Press Generate netlify.toml. The summary line should be “Netlifytoml: publish dist, Node 22”.
- Read every line under “Netlifytoml: publish dist, Node 22” before you copy the Netlifytoml result.
- Press Copy for the whole Netlifytoml result, or Reset to restore “Publish dist on Node 22”.
- For the second check, “Publish public on Node 20”, the summary should be “Netlifytoml: publish public, Node 20”.
Formula / how it works
Example “Publish dist on Node 22” sets Publish directory = dist; Node version = 22.
Netlifytoml returns this exact text:
Netlifytoml: publish dist, Node 22
---
[build]
publish = "dist"
command = "npm run build"
[build.environment]
NODE_VERSION = "22"
The build command is npm run build.
Example “Publish public on Node 20” sets Publish directory = public; Node version = 20.
Netlifytoml returns this exact text:
Netlifytoml: publish public, Node 20
---
[build]
publish = "public"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
The version is written as NODE_VERSION.
Netlifytoml vocabulary for this page: netlify, publish, toml, node, build, netlifytoml.
Netlifytoml pass 1 (“Publish public on Node 20”) prints:
Netlifytoml: publish public, Node 20
---
[build]
publish = "public"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
The words for this pass are netlify, publish, toml, node, build, netlifytoml.
Netlifytoml pass 2 (“Publish dist on Node 22”) prints:
Netlifytoml: publish dist, Node 22
---
[build]
publish = "dist"
command = "npm run build"
[build.environment]
NODE_VERSION = "22"
The words for this pass are netlify, publish, toml, node, build, netlifytoml.
Netlifytoml pass 3 (“Publish public on Node 20”) prints:
Netlifytoml: publish public, Node 20
---
[build]
publish = "public"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
The words for this pass are netlify, publish, toml, node, build, netlifytoml.
Netlifytoml pass 4 (“Publish dist on Node 22”) prints:
Netlifytoml: publish dist, Node 22
---
[build]
publish = "dist"
command = "npm run build"
[build.environment]
NODE_VERSION = "22"
The words for this pass are netlify, publish, toml, node, build, netlifytoml.
Netlifytoml pass 5 (“Publish public on Node 20”) prints:
Netlifytoml: publish public, Node 20
---
[build]
publish = "public"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
The words for this pass are netlify, publish, toml, node, build, netlifytoml.
Netlifytoml pass 6 (“Publish dist on Node 22”) prints:
Netlifytoml: publish dist, Node 22
---
[build]
publish = "dist"
command = "npm run build"
[build.environment]
NODE_VERSION = "22"
The words for this pass are netlify, publish, toml, node, build, netlifytoml.
Netlifytoml pass 7 (“Publish public on Node 20”) prints:
Netlifytoml: publish public, Node 20
---
[build]
publish = "public"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
The words for this pass are netlify, publish, toml, node, build, netlifytoml.
Worked examples
Publish dist on Node 22
Inputs: Publish directory: dist | Node version: 22
Set Publish directory dist, then Node version 22. Press Generate netlify.toml. The Netlifytoml summary should read “Netlifytoml: publish dist, Node 22”.
Result: Netlifytoml: publish dist, Node 22
---
[build]
publish = "dist"
command = "npm run build"
[build.environment]
NODE_VERSION = "22"
The build command is npm run build.
Publish public on Node 20
Inputs: Publish directory: public | Node version: 20
Set Publish directory public, then Node version 20. Press Generate netlify.toml. The Netlifytoml summary should read “Netlifytoml: publish public, Node 20”.
Result: Netlifytoml: publish public, Node 20
---
[build]
publish = "public"
command = "npm run build"
[build.environment]
NODE_VERSION = "20"
The version is written as NODE_VERSION.
Use cases
- Check “Netlifytoml: publish dist, Node 22” before trusting a new Netlifytoml input.
- Check “Netlifytoml: publish public, Node 20” as the second Netlifytoml case.
- The build command is npm run build.
- The version is written as NODE_VERSION.
Tips & limitations
- “Publish dist on Node 22”: The build command is npm run build.
- “Publish public on Node 20”: The version is written as NODE_VERSION.
- Netlifytoml fields: Publish directory, Node version.
- The Netlifytoml summary for the opening example is “Netlifytoml: publish dist, Node 22”.
FAQ
What does “Publish dist on Node 22” return?
Netlifytoml summary: “Netlifytoml: publish dist, Node 22”. Full result: Netlifytoml: publish dist, Node 22 --- [build] publish = "dist" command = "npm run build" [build.environment] NODE_VERSION = "22"
What does “Publish public on Node 20” return?
Netlifytoml summary: “Netlifytoml: publish public, Node 20”. Full result: Netlifytoml: publish public, Node 20 --- [build] publish = "public" command = "npm run build" [build.environment] NODE_VERSION = "20"
Which values produce “Netlifytoml: publish dist, Node 22”?
Publish directory: dist | Node version: 22
Which values produce “Netlifytoml: publish public, Node 20”?
Publish directory: public | Node version: 20
How is “Netlifytoml: publish dist, Node 22” different from “Netlifytoml: publish public, Node 20”?
“Publish dist on Node 22” gives “Netlifytoml: publish dist, Node 22”. “Publish public on Node 20” gives “Netlifytoml: publish public, Node 20”.
What does Netlifytoml include in the full first result?
Netlifytoml: publish dist, Node 22 --- [build] publish = "dist" command = "npm run build" [build.environment] NODE_VERSION = "22"
Runs entirely in your browser; nothing is uploaded. Check the output before you rely on it in production code, data or security decisions.