// the find
sdorra/content-collections
Transform your content into type-safe data collections
Content Collections is a build-time content pipeline for TypeScript projects — you define collections with Zod schemas, it validates your markdown/YAML/JSON at build time and spits out fully-typed imports. It's the spiritual successor to Contentlayer, which was abandoned in 2023, and targets the same audience: developers building content-heavy sites with Next.js, SvelteKit, Remix, or plain Vite who want their frontmatter typed without writing a custom parser.
The adapter model is well-designed — framework-specific packages are thin wrappers over a shared core, so the type-safe import pattern (`import { allPosts } from 'content-collections'`) works identically across Next.js, SvelteKit, and Vite without framework-specific gotchas. The transform step is genuinely useful: you can join collections, fetch external data, or compute derived fields at build time, so your components stay dumb. Hot-reload during dev works without a server restart — it uses a file watcher on the collection directories and regenerates only what changed. The migration tooling for Contentlayer refugees is a thoughtful touch; it handles the config rewrite automatically rather than leaving you to figure out the diff.
Markdown and MDX rendering are not included by default — you install separate packages and wire them into the transform yourself, which the README buries after the basic example. This trips up anyone expecting it to work like Contentlayer out of the box. The generated output is written to `.content-collections/` at the project root (a virtual module alias), which means your IDE needs path alias configuration to resolve `content-collections` correctly — not hard, but not automatic either. There's no incremental build story for large content sites: every `pnpm build` re-validates and re-transforms the full collection from scratch, which will hurt once you have thousands of files. At 1,100 stars it's still a small community, so if you hit an obscure esbuild bundling edge case with your config file, you're mostly on your own.