This repository is a Next.js Storyblok starter template used in following 5 minute tutorial.
To use this project you have to have a Storyblok account. If you don't have one yet you can register at Storyblok, it's free.
Read the Next.js tutorial about connecting Storyblok and Next.js
$ git clone https://github.com/storyblok/react-next-boilerplate.git
$ yarn # or npm install
Create a new empty Space and exchange the preview token with your own in pages/_app.js
.
// in pages/_app.js
storyblokInit({
accessToken: "your-preview-token",
use: [apiPlugin],
components,
});
Set the preview domain in Storyblok to http://localhost:3000/
# to run in developer mode
$ yarn dev # or npm run dev
# to build your project
$ yarn build # or npm run build