Edit a static site on Cloudflare Pages without a CMS
Static sites are fast, cheap and secure — until someone who doesn't use Git needs to change a sentence. Adding a full CMS for that is a big step. There is a lighter way to give a static site on Cloudflare Pages an editor.
The static site dilemma
A plain HTML site on Cloudflare Pages is hard to beat: it loads fast, costs almost nothing, has no database to patch and nothing to hack. The catch shows up the first time a client or a colleague asks to change a sentence. Today that means editing an HTML file, committing it and waiting for a deploy — or asking the one person who knows how.
The usual fix is to move the site into a CMS. That brings back the things you chose static to avoid: a server or a SaaS subscription, a build pipeline, a content model, logins to manage. For a site that changes a few times a month, it's a lot.
A lighter approach: edit at the edge
Cloudflare Pages can run small functions in front of your static files. The Vibe Editor Pages adapter uses that to do two things:
- For a signed-in editor, it adds the edit switch to every page, so they can click a heading, paragraph or picture and change it — by typing or by asking the AI.
- For everyone, it writes the saved changes straight into the HTML at the edge before the page is sent.
The second part is what makes this good for SEO. Search engines, link previews and visitors all get the edited page on first paint — there is no JavaScript swapping text after load, and no flash of old content. Title, description and Open Graph tags are written on the server too.
Install in three steps
- Run the installer against your Pages project. Download the adapter zip from the docs, unzip it, and run:
It finds the folder Pages serves, copies the functions and browser files, and leaves files that already exist alone. It also adds a password page atnode vibe-editor-cloudflare-pages/install.mjs ../my-site/vibe-editor. - Add three secrets in Cloudflare under your project's Settings → Variables and Secrets: your site key from Vibe Editor, the editor password, and a long random string to sign the session.
- Deploy with Git or
wrangler pages deploy. (A drag-and-drop upload in the dashboard leaves the functions out.)
Then open /vibe-editor on your site, enter the password, and you land back on the site with the switch in the corner.
What editing looks like
- Text: click it, write an instruction or type, save. Your own view updates at once; everyone else sees the change within about half a minute.
- Pictures: generate one with AI, pick from the library, or paste an address — with an alt-text field in the same panel.
- Search snippet: the magnifier edits the page's title and meta description.
Edits survive redesigns better than you might expect. Elements are matched by their tag and original text (or by a data-vibe-field name if you add one), and pictures by their original source. If a developer restyles the markup, the edits stay. If someone changes the source text in the HTML, the page goes back to the source — the safe direction.
Security and running cost
- One password, whole site. Whoever has the editor password can edit every page. There are no per-user roles on a static site, so treat the password like a deploy key. Sessions last eight hours, and writes need the signed session cookie.
- No AI key in your project. The AI never runs on the edge. Suggestions and pictures go to Vibe Editor with the site's key, which meters them in credits.
- Optional: keep it all on Cloudflare. Bind a KV namespace to store the saved copy and an R2 bucket for AI pictures, so they're served from your own domain.
- Keep requests cheap. The middleware runs in front of every request. On a busy site, use a
_routes.jsonto keep static assets out of it.
Not on Cloudflare?
For any other static host, the one-tag embed works anywhere you can add a script tag. The trade-off: edits are applied in the browser by JavaScript, so crawlers that don't run JavaScript see the original page. On Cloudflare Pages the edits are in the HTML itself, which is why we recommend the adapter there.
Whichever you use, it's worth starting with the parts of a page search engines read first — see how to write page titles and meta descriptions.
Try now