Publishing a document
Publishing creates an immutable version snapshot that represents the “live” state of your content. The draft/publish workflow is explicit — auto-saves update the working draft, but content is only published when you choose.Add a change summary (optional)
Enter a short description of what changed. This appears in the version
history.
What happens on publish
When you publish a document, the server:- Creates a new row in the
documentVersionstable containing:- Version number — Incremented sequentially (v1, v2, v3…)
- Snapshot — Complete immutable copy of the document’s path, frontmatter, and body at publish time
- Timestamp — When the version was created
- Publisher — The user who triggered the publish
- Change summary — Optional description provided during publish
- Updates the
publishedVersionpointer on the document head to reference the new version
POST /api/v1/content/:documentId/publish and accepts an optional changeSummary and actorId.
After publishing, the document status changes from Draft or Changed to Published. If you make further edits after publishing, the status becomes Changed, indicating the draft has diverged from the last published version.
Unpublishing
Unpublishing removes the published version reference from the document head. The document reverts to Draft status.- The version history is fully preserved — unpublishing does not delete any version snapshots
- The document is no longer available via published content queries
- You can republish at any time, which creates a new version
content:publish capability.
Version history
The version history is accessible from the right sidebar in the document editor. Each version entry shows:- Version number (e.g., v1, v2, v3)
- Timestamp of when the version was published
- Publisher who created the version
- Change summary if one was provided
Comparing versions
Studio includes a diff viewer for comparing any two versions side-by-side. The diff covers three dimensions:- Path — Whether the document’s filesystem path changed between versions
- Frontmatter — Field-by-field comparison showing before/after values for each changed property
- Body — Line-by-line diff of the Markdown/MDX content using LCS-based comparison, with lines marked as unchanged, added, removed, or changed
Version history only tracks published snapshots, not auto-saves. Each
auto-save increments the
draftRevision counter, but these intermediate
states are not preserved. Publish whenever you want to create a recoverable
checkpoint.Restoring a version
You can restore any previous version to make it the current working draft:
The original version remains intact in the history — restoring does not modify or delete existing versions. It creates a new draft state from the selected version’s snapshot.
Restoring deleted documents
Documents are soft-deleted, not permanently removed. Deleted documents are recoverable from the Trash page at/admin/trash.
The trash page provides:
- Search — Filter deleted documents by title or path
- Type filter — Narrow results to a specific content type
- Sort options — Newest first, Created, Path A-Z, Path Z-A
- Pagination — For large numbers of deleted documents
- Restore action — Per-row action to recover a document
CONTENT_PATH_CONFLICT error — you need to rename or delete the conflicting document first.
Duplicating a document
You can duplicate any document from the content list row actions. Duplication:- Creates a new document with a fresh
documentId - Generates an auto-suffixed path to avoid conflicts (e.g.,
my-post.mdxbecomesmy-post-copy.mdx) - Copies the current draft frontmatter and body
- Does not copy version history — the duplicate starts fresh with no published versions