Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blog/2026-03-20-storyblok-adapters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ The Storyblok docs now include a complete guide for the adapter-based setup.
[7]: /docs/php/symfony/storyblok/more-features/id-slug-mapper
[8]: /docs/php/symfony/storyblok/more-features/request-validator
[9]: /docs/php/symfony/storyblok/more-features/backend-edit-url-helper
[10]: /docs/php/symfony/storyblok/definitions-synced-event
[10]: /docs/php/symfony/storyblok/component-sync#definitions-synced-event
[12]: /docs/php/symfony/storyblok/asset-proxy
[13]: /docs/php/symfony/storyblok/more-features
14 changes: 14 additions & 0 deletions blog/2026-08-18-hosting-storyblok.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "Storyblok & Hosting Bundle Updates"
authors: [jannik]
tags: [symfony, storyblok, hosting]
---

The hosting bundle now has `deploy-container` and `deploy-app` hooks. [Read the docs to understand the difference][1].

The first usage of `deploy-app` hooks is in the Storyblok bundle: it now has [automatic component sync][2].



[1]: /docs/php/symfony/hosting/#deploy-app-vs-container
[2]: /docs/php/symfony/storyblok/component-sync#automatic-sync
2 changes: 1 addition & 1 deletion docs/php/library/html-builder/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# HTML Builder

Expand Down
2 changes: 1 addition & 1 deletion docs/php/library/lenient-front-matter/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Lenient Front Matter

Expand Down
2 changes: 1 addition & 1 deletion docs/php/symfony/bundle-helpers/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Bundle Helpers

Expand Down
2 changes: 1 addition & 1 deletion docs/php/symfony/cli/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# CLI

Expand Down
2 changes: 1 addition & 1 deletion docs/php/symfony/embed-helpers/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Embed Helpers

Expand Down
2 changes: 1 addition & 1 deletion docs/php/symfony/feature-flags/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Feature Flags

Expand Down
14 changes: 11 additions & 3 deletions docs/php/symfony/hosting/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Hosting

Expand Down Expand Up @@ -126,10 +126,11 @@ These are called using the console commands:

```shell
bin/console hosting:hook:build
bin/console hosting:hook:deploy
bin/console hosting:hook:deploy-container
bin/console hosting:hook:deploy-app
```

You can integrate into them by implementing the `BuildHookInterface` or `DeployHookInterface` interfaces respectively. Use autoconfiguration, then everything works out-of-the-box.
You can integrate into them by implementing the `BuildHookInterface`, `DeployContainerHookInterface` or `DeployAppHookInterface` interfaces respectively. Use autoconfiguration, then everything works out-of-the-box.

Every task has basically a label and a callback that can perform certain tasks:

Expand All @@ -154,6 +155,13 @@ class MyBuildTask implements BuildHookInterface
}
```

#### Deploy App vs Container

The `deploy-container` hook is for deploying a single container. An application can consist of multiple containers (like hub and worker) and this deploy task should run in every container on every start.

The `deploy-app` hook however is for the init container in Kubernetes. It should run exactly once on every app deployment (and not per container).


### App Validation

App validation is a CLI command intended to be used in your CI, where your app can verify that the app is internally configured correctly.
Expand Down
2 changes: 1 addition & 1 deletion docs/php/symfony/rad/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# RAD Bundle

Expand Down
4 changes: 2 additions & 2 deletions docs/php/symfony/simple-normalizer/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {AddedBadge} from "../../../../src/components/AddedBadge";
import {LinkList} from "@components/Link/LinkList";
import {AddedBadge} from "@components/AddedBadge";

# Simple Normalizer

Expand Down
2 changes: 1 addition & 1 deletion docs/php/symfony/snail/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Snail

Expand Down
2 changes: 1 addition & 1 deletion docs/php/symfony/storyblok/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ You can pass `--force` to automatically confirm the command. This can be used to
:::

On successful sync, the bundle dispatches `StoryblokDefinitionsSyncedEvent`.
See [Definitions Synced Event](./definitions-synced-event) for listener setup.
See [Definitions Synced Event](./component-sync#definitions-synced-event) for listener setup.
67 changes: 67 additions & 0 deletions docs/php/symfony/storyblok/component-sync.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import {AddedBadge} from "@components/AddedBadge";

# Component Sync

## Automatic Sync

<AddedBadge package="21torr/storyblok" version="5.3" />

The Storyblok bundle integrates natively with the [hosting bundle] and offers an automatic sync when doing an app deployment:

```shell
bin/console hosting:hook:deploy-app
```

Before it actually syncs the components to Storyblok however, you need to enable the environments where the automatic sync is enabled:

```yaml title="conf/packages/storyblok.yaml"
storyblok:
sync_definitions_on_app_deploy:
staging: false
production: true
```

With this config the automatic sync is only enabled when deploying the app on production.[^1]


## Manual Sync

You can also manually sync the components using the CLI:

```shell
bin/console storyblok:definitions:sync
```


## Definitions Synced Event

After a successful `storyblok:definitions:sync`, the bundle dispatches `StoryblokDefinitionsSyncedEvent`.

### Event Data

The event provides:

- `io`: `TorrStyle` instance used by the sync command.
- `adapter`: the adapter that was synced.

### Listener Example

```php
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
use Torr\Storyblok\Event\StoryblokDefinitionsSyncedEvent;

#[AsEventListener]
public function onDefinitionsSynced (StoryblokDefinitionsSyncedEvent $event) : void
{
$event->io->writeln("Run post-sync work...");
$event->adapter->managementApi;
}
```

### Notes

- If multiple adapters are synced in one command run, one event is dispatched per adapter.
- The event is only dispatched on successful sync.

[hosting bundle]: /docs/php/symfony/hosting/
[^1]: There is also a shortcut form `sync_definitions_on_app_deploy: false|true` that sets both settings at the same time.
29 changes: 0 additions & 29 deletions docs/php/symfony/storyblok/definitions-synced-event.mdx

This file was deleted.

4 changes: 2 additions & 2 deletions docs/php/symfony/storyblok/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Storyblok

Expand Down Expand Up @@ -53,4 +53,4 @@ Continue with the [adapter guide](./adapters) for setup, usage and configuration
The Storyblok bundle dispatches these events:

- `StoryblokWebhookEvent` for incoming Storyblok webhooks ([Webhook docs](./webhook)).
- `StoryblokDefinitionsSyncedEvent` after successful component sync ([Definitions Synced Event](./definitions-synced-event)).
- `StoryblokDefinitionsSyncedEvent` after successful component sync ([Definitions Synced Event](./component-sync#definitions-synced-event)).
4 changes: 2 additions & 2 deletions docs/php/symfony/task-manager/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {LinkList} from "../../../../src/components/Link/LinkList";
import {AddedBadge} from "../../../../src/components/AddedBadge";
import {LinkList} from "@components/Link/LinkList";
import {AddedBadge} from "@components/AddedBadge";

# Task Manager

Expand Down
2 changes: 1 addition & 1 deletion docs/php/tooling/janus-php.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Janus PHP

Expand Down
2 changes: 1 addition & 1 deletion docs/php/tooling/php-cs-fixer.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# PHP-CS-Fixer

Expand Down
2 changes: 1 addition & 1 deletion docs/ts-scss/atlantis/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Atlantis

Expand Down
2 changes: 1 addition & 1 deletion docs/ts-scss/dune/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Dune

Expand Down
2 changes: 1 addition & 1 deletion docs/ts-scss/janus-ts/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {LinkList} from "../../../src/components/Link/LinkList";
import {LinkList} from "@components/Link/LinkList";

# Janus TS

Expand Down
16 changes: 16 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ const config = {

plugins: [
'docusaurus-plugin-sass',
function ()
{
return {
name: "tsconfig-paths",
configureWebpack ()
{
return {
resolve: {
tsConfig: {
configFile: require.resolve("./tsconfig.json"),
},
},
};
},
};
},
],

markdown: {
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from 'react';
import clsx from 'clsx';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import HomepageFeatures from '@components/HomepageFeatures';


function HomepageHeader ()
Expand Down
5 changes: 5 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@components/*": [
"./src/components/*"
]
},
"plugins": [
{
"name": "typescript-plugin-css-modules"
Expand Down
Loading