3 min read
Live preview for your website in four steps
Show editors their draft on the real website, updating as they type. Here are the four small pieces your website needs, and what each one does.
Headless CMS for Astro
Every page an editor publishes appears at its own address in your Astro website, drawn by .astro components of yours. Pages render on the server, so new pages appear without a rebuild, and React isn't needed.
You keep your stack and your components. Your editors get a visual editor on your real website, reviews, SEO and accessibility checks, with the content hosted in the EU.
The SDK
The typed JavaScript SDK, @bifrost-orbit-cms/sdk, reads published pages with a public key and drafts with a secret one that stays on the server. The quickstart builds the whole website in about 15 minutes.
import { createCmsClient } from '@bifrost-orbit-cms/sdk'import { CMS_API_URL, CMS_DEFAULT_REGION, CMS_PREVIEW_KEY, CMS_PUBLIC_KEY } from 'astro:env/server'export const cms = createCmsClient({ baseUrl: CMS_API_URL, apiKey: CMS_PUBLIC_KEY, previewKey: CMS_PREVIEW_KEY, defaultRegion: CMS_DEFAULT_REGION,})export async function isPreview(url: URL): Promise<boolean> { if (!CMS_PREVIEW_KEY) return false const check = await cms.checkPreview(url.searchParams.get('preview')) return check.valid}For developers
Start a project
Questions
No. There are official SDKs for JavaScript and TypeScript, PHP, Swift and Kotlin, with ready-made help for Next.js and React. Content also comes as JSON over a plain HTTP API and over GraphQL, so a website or app built with Python, Ruby, .NET, Go or anything else can use it too. No SDK is a requirement.
The one for the language your website or app is written in: JavaScript for Next.js, React and Node.js, PHP for Laravel, Symfony and plain PHP, Swift for iOS and macOS apps, and Kotlin for Android apps and JVM servers. They read the same content, so a website and an app can use different SDKs side by side.
Yes. All four are open source under the MIT licence and free to use with every CMS Orbit plan. The PHP, Swift and Kotlin SDKs are on GitHub, and the JavaScript SDK's code ships in its package on npm, so you can read every line.
Yes. Enterprise includes help moving your content. On every plan, your developers can create content types, components and pages through the management API, and editors can import redirects from a spreadsheet so old addresses keep working.
From the blog
3 min read
Show editors their draft on the real website, updating as they type. Here are the four small pieces your website needs, and what each one does.
8 min read
The questions that matter when you pick a headless CMS, from data location to price model, and a table comparing eleven products on the points buyers ask about most.
4 min read
Laravel and Symfony websites and native iOS and Android apps get official SDKs too. All four are typed, open source and read the same content.
Start a trial, create a public key and render your first page with the SDK. The trial is free for 14 days.