Integrate Nuxt with Storyblok as a headless CMS.
This blueprint is ideal for kickstarting new Storyblok and Next.js projects. What's inside:
- Pre-configured default blocks:
page
,teaser
,grid
, andfeature
. - Support for the Visual Editor's live preview.
- Dynamic routing to fetch and render new stories automatically.
- Minimal styling.
Tip
Follow our Nuxt guide for a step-by-step walkthrough and learn more about Storyblok's range of features, including rich text rendering, custom content modeling, and internationalization. See the @storyblok/nuxt package reference for further information.
No Storyblok account yet? Sign up now to experience a 14-day free trial of all features and enjoy our completely free Starter plan.
- Create an empty new Storyblok space
- Create a new repository based on this template
- Open the project on your device
- Install dependencies
npm install
In the root of the project, create a .env
file to store the access token of your space:
STORYBLOK_DELIVERY_API_TOKEN=<REPLACE_WITH_YOUR_TOKEN>
Tip
Copy your space's preview access token from Settings > Access Tokens. Learn more about Storyblok access tokens.
To render a preview of the local project in the Visual Editor, follow these steps:
- In your space, navigate to Settings > Visual Editor.
- Set the default environment to
https://localhost:3000/
. - Save.
- Open the
home
story. - Click Config.
- Type
/
in the Real path.
Run the development server:
npm run dev
Important
To connect the Storyblok Visual Editor, the local project must run over HTTPS. Learn more in the Visual Editor concept. See the Visual Preview part of the Nuxt guide for detailed instructions.
Back in Storyblok, open the Home story to start editing.
Happy building!
- To learn more about what you can do with Storyblok, visit our documentation and learning hub.
- To learn more about the integration between Storyblok and Nuxt, check our dedicated developer tutorials.
- To learn more about Nuxt, check the official documentation.
- Have questions, need help, want to chat with other users? Join our Discord community.
- Visit the Storyblok Help Center.