Working with content (Markdown files, CMS, ...) is surprisingly difficult when developing modern sites.
Contentlayer (now in beta) is a content SDK which aims to make content easy for developers with a focus on great DX & performance.
Contentlayer 0.2.5:
◆ More flexible Markdown/MDX processing
◆ Better error messages
◆ Various bug fixes & improvements
Big thanks to all contributors! 🙏
Contentlayer 0.2.7:
◆ New `image` field type incl. blurhash and size support
◆ Support for relative imports in MDX content
◆ Various bug fixes & improvements
Big thanks to all contributors! 🙏
Contentlayer is simple to use & provides great DX:
⚡️ Live-reloading/HMR for your content
💯 First-class integration with @nextjs
☑️ Content validation
💙 Auto-generated TypeScript types
🔗 Flexible content modeling
Check out this video to see it action:
⚡️ Did we mention that Contentlayer is fast?
We tested the same site (1,000+ unique pages) with @nextjs and @gatsbyjs:
◆ ~2.5x faster compared to manual processing
◆ ~1.7x faster than Gatsby (cold & cached builds)
(Used machine: GitHub Actions. See: github.com/contentlayerde…)