Which SDK for my stack?
Every SDK reads the same thing — your site’s published articles from the keyless static feed. They differ in how they fold those reads into your framework’s data and caching model. Pick by framework; the article shape is identical across all of them.
At a glance
Section titled “At a glance”| Framework | Package | What it gives you | Rendering model |
|---|---|---|---|
| Next.js App Router | @ghostwritr/next | A server-only data client (createGhostwritr) — getArticles, getArticle, generateStaticParams — plus a feed.updated revalidate handler. | ISR, SSG, or dynamic SSR — one config flag. |
| Astro | @ghostwritr/astro | A Content Layer loader (ghostwritr({ siteId })) that syncs the feed into a content collection at build time. | Static (build-time), with a redeploy hook for freshness. |
| React Router v7 | @ghostwritr/react-router | The feed fetchers plus articleMeta — you write the route loader; it returns <title>/OG/canonical/JSON-LD. | SSR (loaders run on the server). |
| Vue & Nuxt | @ghostwritr/vue | The feed fetchers plus articleHead (a useHead() input) and an ArticleContent Markdown renderer. | SSR/SSG in Nuxt, or plain Vue/Vite SSR. |
| Svelte & SvelteKit | @ghostwritr/svelte | The feed fetchers plus an ArticleHead component (renders into svelte:head) and an ArticleContent renderer. | SSR/SSG in SvelteKit. |
| Any JS runtime | @ghostwritr/feed | The framework-agnostic core: fetchArticles, fetchArticle, the types, and the webhook signing helpers. | Yours — bring your own caching via opts.fetch. |
| React (any renderer) | @ghostwritr/react | <ArticleContent> — renders an article’s Markdown body to React. | Renderer-neutral; RSC-safe. |
Choosing
Section titled “Choosing” Next.js App Router. You want ISR and on-demand revalidation with the least wiring. Start here for a typical React blog.
Astro Content-driven static sites. The loader pulls articles into a content collection; render them like any local content.
React Router v7 The Remix successor. You write route loaders that call the fetchers, and articleMeta handles SEO.
Vue & Nuxt Nuxt or plain Vue. Fetch in useAsyncData, articleHead builds the useHead input, and ArticleContent renders the body.
Svelte & SvelteKit Fetch in a load function, ArticleHead writes the SEO into svelte:head, and ArticleContent renders the body.
React renderer turns article Markdown into React — pair it with any of the data SDKs.
When to use the core feed directly
Section titled “When to use the core feed directly”Reach for @ghostwritr/feed when no framework wrapper fits — a Cloudflare Worker, a build script, a CLI, or your own caching layer. The wrappers (next, astro, react-router, vue, svelte) all re-export its types and call its fetchers, so the contract is identical; you just supply your own caching through opts.fetch.
The feed core fetchArticles, fetchArticle, the types, and the webhook signing helpers — framework-agnostic.
What to reach for next
Section titled “What to reach for next”- Render the Markdown —
<ArticleContent>is GFM-on, HTML-sanitized, and RSC-safe. See Rendering articles. - Understand the data — the article shape and SEO + JSON-LD drive every page.
- Publish instantly — wire the
feed.updatedwebhook. See Instant updates.