This is a Next.js project bootstrapped with create-next-app
.
First, install dependencies:
npm install
# or
yarn install
# or
pnpm install
# or
bun install
Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Then open https://localhost:3000 with your browser to see the result.
Here follows a brief overview of the codebase:
To add a new component, you need to do three things:
- Update the content model, which describes the structure of the content with TypeScript types; see
src/content/content-model.ts
. - Create a component that renders the content; see
src/components/
. - Register the component in
src/lib/storyblok.ts
This project has TypeScript types that describe the content model; however, by default, this content is not validated. To parse the content, find the comment that says // Parsing:
and uncomment the lines below.
You can use any validation library you prefer—this project uses PureParse because this library allows you to type check the parser.
In this case, when you add a new component, you will also need to update the parsing logic.
For issues related to the Business blueprint, please open issues at the corresponding template repository: