Drafts and publishing
How autosaved drafts, the Publish button and published-only public routes work in Olgax DXP, and why draft pages never leak to visitors.
The pages collection uses Payload's built-in drafts (versions.drafts). There is no custom versioning system.
The workflow
Edit
Changing anything in the editor autosaves a draft after a short pause. A draft never affects the live page.
Publish
Press Publish in the editor. The current changes become the published version
(_status: "published"), and only then does the public route show them.
Come back later
Reopening the editor loads the latest draft, or the published version when there is no newer draft. In-progress work is not lost.
Who sees what
| Visitor | Sees |
|---|---|
| Anonymous | Published pages only |
| Signed-in editor | Everything, including drafts, in the editor and the admin |
Why access control is explicit
Payload's draft option chooses which version is returned when you ask for it. It does not hide documents whose
_status is "draft" from an ordinary query. So Olgax enforces the rule in two places:
- The public render route filters on
_statusequal to"published". - The
pagescollection'saccess.readreturns only published pages to anyone who is not signed in. This protects the REST and GraphQL APIs.
Both matter. The Local API used by the app's own routes bypasses access control by default, and the HTTP APIs do not.
Publishing triggers webhooks
Publishing a page, or deleting one, fires webhooks if you have configured any. A plain autosaved draft never fires one.
Questions, ideas or something not working?
Ask in our official Discord, open an issue on GitHub, or edit this page.
Custom components
Build your own Puck blocks for Olgax DXP with pnpm new:component - fields, styling, live editor updates, server and client components, and common pitfalls.
Theming
Restyle an Olgax DXP site with --olgax-* CSS variables, Site Settings colors, per-page and per-block color overrides, and dark mode without forking components.