Docs / Set up
Set up your first site
You do this once per site. Afterwards, anyone with the password can open your staging site, click the words and fix them, and every save lands in your code.
-
Put the site's code on GitHub
Any repo works, private too. Sites made with Lovable, Bolt or Replit can connect to GitHub from inside the tool. Sites made with Claude Code, Cursor or Codex usually live in a repo already.
-
Deploy a staging branch
Make a
stagingbranch and have Netlify or Cloudflare Pages deploy it at its own address. That address is where the editing happens. Your live site stays as it is. -
Add EditStatic to the repo
On the staging branch, in the repo's folder, run one of these:
npx github:jefvandegraaf/edit-static init --host netlify npx github:jefvandegraaf/edit-static init --host cloudflareIt adds three files: the editor for your host, a GitHub Action that writes saved edits into your code, and
editstatic.config.json. Commit them and push. -
Create a GitHub token
Go to github.com/settings/personal-access-tokens/new. Under Repository access choose Only select repositories and pick this repo. Under Permissions set Contents to Read and write. Generate the token and copy it.
-
Let the Action push
In the repo on GitHub, open Settings, Actions, General. Under Workflow permissions choose Read and write permissions and save.
-
Add five settings to the staging deployment only
Your host's guide says exactly where. Never add them to production: without them, the live site has no editor at all.
Name Value EDIT_PASSWORDA long password you choose. Keep it secret. GITHUB_TOKENThe token from GitHub: this one repo, Contents read and write. Keep it secret. GITHUB_REPOYour repo as owner/name, for exampleyou/your-siteGITHUB_BRANCHstaging, or whichever branch the editing deployment builds fromEDIT_HOSTThe staging address without https://, for examplestaging--your-site.netlify.app -
Redeploy and check
Settings apply to new deployments, so redeploy staging. Then open
https://<your staging address>/__es/api/health. It says"ready": true, or lists the names of the settings it can't see. -
Make a test edit
Open your staging address with
?editon the end and enter the password. Change one word and press Save all. After about a minute the bar says Published, and the commit is in your repo.