Project demo demonstrating the setup of :
- Next.js app router and Draft mode
- Storyblok
- Redirection.io
- Clone the repository
- Create a
.env
file with the following variables :REDIRECTIONIO_TOKEN
NEXT_PUBLIC_STORYBLOK_ACCESS_TOKEN
- Run
yarn install
- Run
yarn dev
- Go to http://localhost:3000/
This app exposes two endpoints :
/api/draft
: enable draft mode/api/disable-draft
: disable draft mode
- Go to https://redirection.io/
- Create an account
- Create a new project
- Get the API key
- Set the API key in the
.env
file
- Go to https://app.storyblok.com/
- Create an account
- Create a new space
- Get the access token
- Set the access token in the
.env
file
Add the preview URLs in the settings of your project in Storyblok :