Krantho is in active development and not yet published to npm. Read what that means today.
esc

Search the documentation and product pages. Type “theme” to switch themes.

Deploy

Deploy

Where a krantho site can run: hosts, CDNs, databases and media stores side by side, with the page cache strategy each combination uses.

Amazon CloudFrontGoogle Cloud CDNNode.js serverVercel
KindCDNCDNServerPlatform
Page cachecdncdnnonenext-isr
Frameworks
  • Next.js
  • SvelteKit
  • Express
  • Next.js
  • SvelteKit
  • Express
  • Next.js
  • SvelteKit
  • Express
  • Next.js
  • SvelteKit
Databases
  • SQLite
  • Postgres
  • SQLite
  • Postgres
  • SQLite
  • Postgres
  • Postgres
Media stores
  • Local disk
  • Vercel Blob
  • S3-compatible
  • Google Cloud Storage
  • Local disk
  • Vercel Blob
  • S3-compatible
  • Google Cloud Storage
  • Local disk
  • Vercel Blob
  • S3-compatible
  • Google Cloud Storage
  • Vercel Blob
  • S3-compatible
  • Google Cloud Storage
none
Every request renders the page.
next-isr
Next.js keeps each page until a change invalidates it.
cdn
The CDN keeps each page until a change purges it.

Content between deploys

Editors change content on the live site, and developers change it in the repository. Krantho moves it both ways, on every host on this page. On Vercel, for example, Studio writes to the site's Postgres database. When you want the editors' work in git, krantho export pulls it from the production API as markdown files, and you commit and push them.

The push builds a new deployment, and the build writes a content manifest (Ship content file changes with a deploy). When the deployment starts, the server compares each file with its document. New and changed files are imported. A document an editor has changed since keeps the editor's version, and the clash is recorded as a conflict. A checkpoint is taken before anything is imported. Deploy to Vercel has the full setup.

Content between deploys on Vercel A git push starts a Vercel build, which writes a content manifest. The new deployment imports new and changed files into Postgres, after a checkpoint. Editors work in Studio on the live site. krantho export pulls their changes from the production API as markdown files, which are committed to the repository. Git repository content/*.md krantho.collections.ts Vercel build next build writes the content manifest Production Vercel Functions Postgres holds the content editors work in Studio git push deploy imports new and changed files, checkpoint first krantho export editors' changes as markdown, committed and pushed
Terminal
export KRANTHO_API_URL=https://example.com
krantho auth login --token "$KRANTHO_API_TOKEN"
krantho export pages --out content/pages
git add content/pages
git commit -m "content: the editors' changes"
git push