Environment Variables
If your site talks to external services — a form endpoint, an analytics key, a CMS token — put those values in the Environment panel in the left rail instead of hardcoding them.
Managing variables
Section titled “Managing variables”The panel lists every variable in the project. Add a key and value, edit inline, or remove with ✕ — then Save. Values are masked; use the ◎ toggle to reveal one.
Two rules worth knowing:
- Keys starting with
PUBLIC_are visible to code running in the browser. Everything else is only available at build time — safe for secrets your pages read while building. - After saving, restart the dev server — open the Code view and use the start/stop control at the bottom of the window — so the preview picks up the change.
What happens on publish
Section titled “What happens on publish”Publishing builds your site with the current values — they’re baked into the published output. Changed a value? Just republish.