From b54a3a1cd963788342c48aa8d80ad58c578e522d Mon Sep 17 00:00:00 2001 From: Silas Joisten Date: Tue, 7 Jul 2026 11:21:16 +0200 Subject: [PATCH] feat(storyblok/symfony-bundle): Recipe for version 1.18 (#2008) --- .../1.18/config/packages/storyblok.yaml | 35 +++++++++++++++++++ .../1.18/config/routes/storyblok.yaml | 8 +++++ storyblok/symfony-bundle/1.18/manifest.json | 19 ++++++++++ .../1.18/templates/base.html.twig | 19 ++++++++++ 4 files changed, 81 insertions(+) create mode 100644 storyblok/symfony-bundle/1.18/config/packages/storyblok.yaml create mode 100644 storyblok/symfony-bundle/1.18/config/routes/storyblok.yaml create mode 100644 storyblok/symfony-bundle/1.18/manifest.json create mode 100644 storyblok/symfony-bundle/1.18/templates/base.html.twig diff --git a/storyblok/symfony-bundle/1.18/config/packages/storyblok.yaml b/storyblok/symfony-bundle/1.18/config/packages/storyblok.yaml new file mode 100644 index 00000000..4b907b9e --- /dev/null +++ b/storyblok/symfony-bundle/1.18/config/packages/storyblok.yaml @@ -0,0 +1,35 @@ +storyblok: + base_uri: '%env(STORYBLOK_API_BASE_URI)%' + token: '%env(STORYBLOK_API_TOKEN)%' + version: '%env(STORYBLOK_VERSION)%' + # assets_token: '%env(STORYBLOK_ASSETS_API_TOKEN)%' + # webhook_secret: '%env(STORYBLOK_WEBHOOK_SECRET)%' + # auto_resolve_relations: true + # auto_resolve_links: true + # controller: + # ascending_redirect_fallback: true + + cdn: + storage: + type: filesystem + path: '%env(resolve:STORYBLOK_CDN_STORAGE_PATH)%' + +when@dev: + storyblok: + management_token: '%env(STORYBLOK_MANAGEMENT_API_TOKEN)%' + space_id: '%env(STORYBLOK_SPACE_ID)%' + +when@prod: + storyblok: + controller: + cache: + public: true + max_age: 3600 + smax_age: 3600 + must_revalidate: true + + cdn: + cache: + public: true + max_age: 604800 + smax_age: 604800 diff --git a/storyblok/symfony-bundle/1.18/config/routes/storyblok.yaml b/storyblok/symfony-bundle/1.18/config/routes/storyblok.yaml new file mode 100644 index 00000000..f1714d79 --- /dev/null +++ b/storyblok/symfony-bundle/1.18/config/routes/storyblok.yaml @@ -0,0 +1,8 @@ +storyblok_webhook: + resource: '@StoryblokBundle/config/routes/webhook.php' + +storyblok_content_type: + resource: '@StoryblokBundle/config/routes/content_type.php' + +storyblok_cdn: + resource: '@StoryblokBundle/config/routes/cdn.php' diff --git a/storyblok/symfony-bundle/1.18/manifest.json b/storyblok/symfony-bundle/1.18/manifest.json new file mode 100644 index 00000000..56aa11f0 --- /dev/null +++ b/storyblok/symfony-bundle/1.18/manifest.json @@ -0,0 +1,19 @@ +{ + "bundles": { + "Storyblok\\Bundle\\StoryblokBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/", + "templates/": "templates/" + }, + "env": { + "STORYBLOK_API_BASE_URI": "https://api.storyblok.com", + "STORYBLOK_API_TOKEN": "", + "STORYBLOK_VERSION": "draft", + "STORYBLOK_CDN_STORAGE_PATH": "%kernel.project_dir%/var/cdn", + "#1": "STORYBLOK_ASSETS_API_TOKEN=", + "#2": "STORYBLOK_WEBHOOK_SECRET=", + "#3": "STORYBLOK_MANAGEMENT_API_TOKEN=", + "#4": "STORYBLOK_SPACE_ID=" + } +} diff --git a/storyblok/symfony-bundle/1.18/templates/base.html.twig b/storyblok/symfony-bundle/1.18/templates/base.html.twig new file mode 100644 index 00000000..8fb86e62 --- /dev/null +++ b/storyblok/symfony-bundle/1.18/templates/base.html.twig @@ -0,0 +1,19 @@ + + + + + {% block title %}Welcome!{% endblock %} + + {% block stylesheets %} + {% endblock %} + + {% block javascripts %} + {% endblock %} + + +{% block body %}{% endblock %} +{% block storyblok_scripts %} + {{ storyblok_js_bridge_scripts() }} +{% endblock %} + +