Key points
- 01Save writes a draft. Publish is a separate, deliberate step.
- 02Preview routes render the draft so you can check it before anyone else can.
- 03The page slug home maps to the site root.
- 04Publishing content is not the same as deploying your application.
Steps
- 01
Save the draft
Saving stores the document revision in PostgreSQL. Nothing on the public site changes at this point, which means an unfinished layout can sit in the editor for as long as it needs to.
- 02
Open the preview route
A preview route renders the draft document through the same runtime the published page uses, so what you approve is what will ship.
tsx // src/app/preview/[pageId]/page.tsx import { notFound } from "next/navigation"; import { RenderedPage } from "pagiera/runtime"; import { getPagieraServer, pagieraConfigFromEnv, } from "pagiera/server";Preview routes show unpublished work. Protect them the same way you protect the editor.
- 03
Publish
Publishing promotes the approved draft to the public page and refreshes the Redis-backed published cache. The public route then serves the new revision.
- 04
Render the published page
Published documents are loaded on the server so Request blocks finish before HTML is returned.
tsx const server = await getPagieraServer(pagieraConfigFromEnv()); const page = await server.getPublishedPage(slug, { query, params, page: { slug }, }); if (!page) notFound();
What publishing does not do
- It does not deploy your host application — your own pipeline still owns that.
- It does not configure DNS or a domain.
- It does not change your authentication or infrastructure.
Questions
No. Saving updates the draft. You preview the draft and then publish to update the public page. The home slug maps to /.
Pagiera keeps page documents and revisions in PostgreSQL, and the editor exposes a History tab. Check the behaviour of the version you installed before relying on a specific rollback flow.