Skip to content

storyblok/blueprint-business-nextjs

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

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.

About the codebase

Here follows a brief overview of the codebase:

How to add a new component

To add a new component, you need to do three things:

  1. Update the content model, which describes the structure of the content with TypeScript types; see src/content/content-model.ts.
  2. Create a component that renders the content; see src/components/.
  3. Register the component in src/lib/storyblok.ts

Validation/Parsing

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.

General

For issues related to the Business blueprint, please open issues at the corresponding template repository:

About

Blueprint with business template using next.js

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •