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

Install the package:

composer require 21torr/storyblok

If you are using Symfony Flex you are all set.

Manual configuration

You need to define various environment variables:

.env
# 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:

config/packages/storyblok.yaml
storyblok:
space_id: "%env(int:STORYBLOK_SPACE_ID)%"
management_token: "%env(STORYBLOK_MANAGEMENT_TOKEN)%"
content_token: "%env(STORYBLOK_CONTENT_TOKEN)%"