Components / cms-versions
Version history
Versions with author, note and changed fields; compare any two side by side or unified with word highlights; restore or publish a version.
With the shadcn CLI
npx shadcn add https://agent-cms-docs.vercel.app/r/cms-versions.jsonWith the agent-cms CLI
npx @mainsoft/agent-cms add cms-versionsLive demoRuns on a demo database that resets every 30 minutes.
Version history
Loading…
Usage#
<CmsVersions collection="posts" slug={slug} onBack={() => router.back()} />Pick any two versions to compare. Restoring creates a new version; publishing an old one makes it public again.
Install#
npx @mainsoft/agent-cms add cms-versionsIt also needs CmsProvider from cms-lib around your admin:
<CmsProvider baseUrl="/api/cms">{children}</CmsProvider>