Skip to main content

Storyblok

An integration bundle for Storyblok.

This bundle provides helpers for

  • Describing the Storyblok component data structures
  • Syncing the data structure to Storyblok
  • Fetching data and validating it against the defined structure

Installation

You need to define various environment variables:

# your space id as number
STORYBLOK_SPACE_ID=

# your management token
STORYBLOK_MANAGEMENT_TOKEN=

# your content token – with `preview` scope
STORYBLOK_CONTENT_TOKEN=

Then add the base config in config/packages/storyblok.yaml:

storyblok:
space_id: "%env(int:STORYBLOK_SPACE_ID)%"
management_token: "%env(STORYBLOK_MANAGEMENT_TOKEN)%"
content_token: "%env(STORYBLOK_CONTENT_TOKEN)%"

Then install the package:

composer require 21torr/storyblok