Versioning
Headcode CMS includes a simple but powerful versioning system.
It lets you clone all content from an existing version, make changes safely, and prepare new content for an upcoming release, campaign, or website update.
When combined with Vercel preview deployments, each version can even have its own public preview URL, making it easy for teams to review and approve new content before publishing.
1. How Versioning Works
A Headcode CMS version contains all entries and their sections.
When you create a new version and clone it from a previous one, all data, entries, sections, and fields, are duplicated.
Each version is defined in your headcode.config.ts file:
export const headcodeConfig: HeadcodeConfig = { version: 'v02', clone: 'v01', entries: [...],};In this example, a new version v02 is created by cloning everything from version v01.
2. Database Structure
Each entry in the database tracks which version it belongs to.
The entries table includes:
id
version
namespace
key
3. Typical Versioning Workflow
Create a new Git branch for the new version
Update your headcode.config.ts to set the new version and clone from the previous one (e.g., version: v02, clone: v01)
Push the branch to GitHub. Vercel will automatically create a new preview deployment with its own public URL
Open the Headcode Admin in that preview deployment, you’ll be prompted to clone the content from the previous version
Edit and prepare the new content in the Admin interface
Review the preview site and verify everything looks good
Merge the branch into main, this triggers a new production deployment
Your new version is now live
4. Summary
Versioning in Headcode CMS is designed to match real‑world workflows.
It integrates naturally with Git, Vercel, and modern frontend development, giving you a repeatable, safe process for launching new content versions without disrupting your live site.