Remote mode

Serve the editor from your deployed site so a non-technical person can edit from anywhere, with no git, no GitHub account, and no local setup. Saves become commits; your host redeploys.

One route

npm install @editsy/next

Then create app/editsy/[[...editsy]]/route.ts:

import { createEditsy } from "@editsy/next";

export const { GET, POST } = createEditsy();

That's the whole integration. yoursite.com/editsy is now a login page.

Environment

  • EDITSY_SECRET: session signing secret, long and random
  • EDITSY_EDITORS: JSON list of editors; hash passwords with npx editsy hash-password
  • EDITSY_GITHUB_REPO / EDITSY_GITHUB_TOKEN: the repo to commit to, and a fine-grained token scoped to just that repo
  • EDITSY_SMTP_URL: optional; enables "email me a login link"

Editors can also live in a committed editsy.editors.json. Without auth configured, a production deployment answers 503 rather than exposing an open editor.

How publishing works

Each save becomes a git commit through the GitHub API, credited to the editor (Edited-by: name <email>). Your host's deploy-on-push does the rest. There's no database anywhere: the repo is the content store, and sessions are stateless signed cookies.

On Vercel

Add this to next.config.ts so the editor's assets ship with the route:

const config = {
  outputFileTracingIncludes: {
    "/editsy/[[...editsy]]": ["./node_modules/@editsy/editor/dist/**"],
  },
};