zopio
has a dedicated CMS package that can be used to generate type-safe data collections from your content. This approach provides a structured way to manage your content while maintaining full type safety throughout your application. By default, next-forge uses BaseHub as the CMS.
Key Features
- Type-safe content: Generate TypeScript types from your content schema
- Real-time updates: Automatic revalidation when content changes
- Draft mode support: Preview unpublished content in your application
- Structured content: Organize content in collections with relationships
- Rich text support: Render rich text content with custom components
- Image optimization: Built-in image resizing and optimization
Setup
Here’s how to quickly get started with your new CMS.1. Fork the basehub/zopio
template
You’ll be forking a BaseHub repository which contains the zopio compatible content schema.
Once you fork the repository, you’ll need to get your Read Token from the “Connect to your App” page:
2. Update your environment variables
Update your environment variables to use the new BaseHub token. For example:apps/web/.env
3. Start the dev server
When you runpnpm dev
, the CMS package will generate the type-safe BaseHub SDK, and watch changes to your CMS’s schema.
You might need to run
Restart TS Server
in your IDE for TypeScript to pick up the new types.Querying Basics
The structure of the CMS should look something like this:cms
package, within the blog
and legal
objects. You can read more about the BaseHub SDK in their docs.