Skip to content

Commit b54a3a1

Browse files
authored
feat(storyblok/symfony-bundle): Recipe for version 1.18 (#2008)
1 parent 7a93483 commit b54a3a1

4 files changed

Lines changed: 81 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
storyblok:
2+
base_uri: '%env(STORYBLOK_API_BASE_URI)%'
3+
token: '%env(STORYBLOK_API_TOKEN)%'
4+
version: '%env(STORYBLOK_VERSION)%'
5+
# assets_token: '%env(STORYBLOK_ASSETS_API_TOKEN)%'
6+
# webhook_secret: '%env(STORYBLOK_WEBHOOK_SECRET)%'
7+
# auto_resolve_relations: true
8+
# auto_resolve_links: true
9+
# controller:
10+
# ascending_redirect_fallback: true
11+
12+
cdn:
13+
storage:
14+
type: filesystem
15+
path: '%env(resolve:STORYBLOK_CDN_STORAGE_PATH)%'
16+
17+
when@dev:
18+
storyblok:
19+
management_token: '%env(STORYBLOK_MANAGEMENT_API_TOKEN)%'
20+
space_id: '%env(STORYBLOK_SPACE_ID)%'
21+
22+
when@prod:
23+
storyblok:
24+
controller:
25+
cache:
26+
public: true
27+
max_age: 3600
28+
smax_age: 3600
29+
must_revalidate: true
30+
31+
cdn:
32+
cache:
33+
public: true
34+
max_age: 604800
35+
smax_age: 604800
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
storyblok_webhook:
2+
resource: '@StoryblokBundle/config/routes/webhook.php'
3+
4+
storyblok_content_type:
5+
resource: '@StoryblokBundle/config/routes/content_type.php'
6+
7+
storyblok_cdn:
8+
resource: '@StoryblokBundle/config/routes/cdn.php'
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"bundles": {
3+
"Storyblok\\Bundle\\StoryblokBundle": ["all"]
4+
},
5+
"copy-from-recipe": {
6+
"config/": "%CONFIG_DIR%/",
7+
"templates/": "templates/"
8+
},
9+
"env": {
10+
"STORYBLOK_API_BASE_URI": "https://api.storyblok.com",
11+
"STORYBLOK_API_TOKEN": "",
12+
"STORYBLOK_VERSION": "draft",
13+
"STORYBLOK_CDN_STORAGE_PATH": "%kernel.project_dir%/var/cdn",
14+
"#1": "STORYBLOK_ASSETS_API_TOKEN=",
15+
"#2": "STORYBLOK_WEBHOOK_SECRET=",
16+
"#3": "STORYBLOK_MANAGEMENT_API_TOKEN=",
17+
"#4": "STORYBLOK_SPACE_ID="
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>{% block title %}Welcome!{% endblock %}</title>
6+
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
7+
{% block stylesheets %}
8+
{% endblock %}
9+
10+
{% block javascripts %}
11+
{% endblock %}
12+
</head>
13+
<body>
14+
{% block body %}{% endblock %}
15+
{% block storyblok_scripts %}
16+
{{ storyblok_js_bridge_scripts() }}
17+
{% endblock %}
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)