CLI
To integrate your local definitions with Storyblok, you need to push your config to their API. There are ready-to-use commands for that.
Call the command via:
bin/console storyblok:*
Adapter Scope
All commands accept optional adapter keys. If no key is passed, all adapters are used.
bin/console storyblok:debug
bin/console storyblok:debug main
bin/console storyblok:debug main marketing
storyblok:debug
Renders debug details for your configured adapter(s):
- Adapter key and Storyblok space metadata
- Components used in each adapter
- Unknown components in the space
- Component library and asset proxy stats
If you have manually managed components in Storyblok, you can ignore them in this overview.
However, renamed components are not automatically removed in Storyblok, so this command is great to see if there is something to clean up.
storyblok:definitions:validate
Validates local component definitions for the selected adapter(s).
storyblok:definitions:sync
Pushes local component definitions to Storyblok for the selected adapter(s).
By default, you are asked to confirm to sync the structure.
You can pass --force to automatically confirm the command.
--force is only allowed in production.
To sync your definitions during deployment, you don't need to call this command yourself. Use the automatic sync via the hosting bundle's deploy-app hook instead.
On successful sync, the bundle dispatches StoryblokDefinitionsSyncedEvent.
See Definitions Synced Event for listener setup.