Skip to content

Commit d626d02

Browse files
committed
Merge branch 'release2.13.0'
2 parents 5be6a94 + 2098360 commit d626d02

File tree

5 files changed

+82
-83
lines changed

5 files changed

+82
-83
lines changed

.idea/laravel-storyblok.iml

+1-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

+2-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
}
2020
],
2121
"require": {
22-
"php": "^7.4|^8.0",
23-
"ext-json": "*",
24-
"barryvdh/reflection-docblock": "^2.0",
25-
"embed/embed": "^3.4",
26-
"illuminate/support": "^7.0|^8.0|^9.0",
27-
"imgix/imgix-php": "^3.3",
28-
"ivopetkov/html5-dom-document-php": "2.*",
29-
"league/commonmark": "^2.0",
30-
"mundschenk-at/php-typography": "^6.5",
31-
"spatie/schema-org": "^3.3",
32-
"storyblok/php-client": "^1.4",
33-
"storyblok/richtext-resolver": "1.0.0"
22+
"php": "^8.0",
23+
"ext-json": "*",
24+
"barryvdh/reflection-docblock": "^2.0",
25+
"embed/embed": "^3.4",
26+
"illuminate/support": "^8.0|^9.0",
27+
"imgix/imgix-php": "^3.3",
28+
"ivopetkov/html5-dom-document-php": "2.*",
29+
"league/commonmark": "^2.0",
30+
"mundschenk-at/php-typography": "^6.5",
31+
"spatie/schema-org": "^3.3",
32+
"storyblok/php-client": "^2.2",
33+
"storyblok/richtext-resolver": "2.0.0"
3434
},
3535
"require-dev": {
3636
"mockery/mockery": "^1.2",

config/storyblok.php

+62-56
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return [
44

5-
/*
5+
/*
66
|--------------------------------------------------------------------------
77
| Storyblok Preview API key
88
|--------------------------------------------------------------------------
@@ -12,9 +12,9 @@
1212
| in the editor or when debug mode is enabled.
1313
|
1414
*/
15-
'api_preview_key' => env('STORYBLOK_PREVIEW_API_KEY'),
15+
'api_preview_key' => env('STORYBLOK_PREVIEW_API_KEY'),
1616

17-
/*
17+
/*
1818
|--------------------------------------------------------------------------
1919
| Storyblok Public API key
2020
|--------------------------------------------------------------------------
@@ -23,63 +23,69 @@
2323
| This key is used when your website is live and debug is off.
2424
|
2525
*/
26-
'api_public_key' => env('STORYBLOK_PUBLIC_API_KEY'),
26+
'api_public_key' => env('STORYBLOK_PUBLIC_API_KEY'),
2727

28-
/*
28+
/*
29+
|--------------------------------------------------------------------------
30+
| Specify which Storyblok API region to use
31+
|--------------------------------------------------------------------------
32+
|
33+
| Defaults to null which should be the original EU region
34+
|
35+
*/
36+
'api_region' => null,
37+
38+
/*
2939
|--------------------------------------------------------------------------
3040
| Use SSL when calling the Storyblok API
3141
|--------------------------------------------------------------------------
3242
|
3343
| Request content from the secure https address or just http
3444
|
3545
*/
36-
'use_ssl' => true,
46+
'use_ssl' => true,
3747

38-
/*
48+
/*
3949
|--------------------------------------------------------------------------
4050
| Storyblok draft mode
4151
|--------------------------------------------------------------------------
4252
|
4353
| Request draft data
4454
|
4555
*/
46-
'draft' => env('STORYBLOK_DRAFT', false),
56+
'draft' => env('STORYBLOK_DRAFT', false),
4757

48-
49-
/*
58+
/*
5059
|--------------------------------------------------------------------------
5160
| Storyblok Personal access token
5261
|--------------------------------------------------------------------------
5362
|
5463
| Enter your Storyblok Personal access token to access their management API
5564
|
5665
*/
57-
'oauth_token' => env('STORYBLOK_OAUTH_TOKEN', null),
58-
66+
'oauth_token' => env('STORYBLOK_OAUTH_TOKEN', null),
5967

60-
61-
/*
68+
/*
6269
|--------------------------------------------------------------------------
6370
| Storyblok Space ID
6471
|--------------------------------------------------------------------------
6572
|
6673
| Enter your Storyblok space ID for use with the management API
6774
|
6875
*/
69-
'space_id' => env('STORYBLOK_SPACE_ID', null),
76+
'space_id' => env('STORYBLOK_SPACE_ID', null),
7077

71-
72-
/*
78+
/*
7379
|--------------------------------------------------------------------------
7480
| Storyblok debug
7581
|--------------------------------------------------------------------------
7682
|
7783
| Enable debug mode for Storyblok. This prints useful data to the screen.
7884
|
7985
*/
80-
'debug' => env('STORYBLOK_DEBUG'),
86+
'debug' => env('STORYBLOK_DEBUG'),
8187

82-
/*
88+
/*
8389
|--------------------------------------------------------------------------
8490
| Enable caching
8591
|--------------------------------------------------------------------------
@@ -89,17 +95,17 @@
8995
*/
9096
'cache' => env('STORYBLOK_CACHE', true),
9197

92-
/*
98+
/*
9399
|--------------------------------------------------------------------------
94100
| Cache duration
95101
|--------------------------------------------------------------------------
96102
|
97103
| Specifies how many minutes to cache responses from Storkyblok for.
98104
|
99105
*/
100-
'cache_duration' => env('STORYBLOK_DURATION','60'),
106+
'cache_duration' => env('STORYBLOK_DURATION','60'),
101107

102-
/*
108+
/*
103109
|--------------------------------------------------------------------------
104110
| Component class namespaces
105111
|--------------------------------------------------------------------------
@@ -108,19 +114,19 @@
108114
| listed in the order searched and loaded.
109115
|
110116
*/
111-
'component_class_namespace' => ['App\Storyblok\\'],
117+
'component_class_namespace' => ['App\Storyblok\\'],
112118

113-
/*
119+
/*
114120
|--------------------------------------------------------------------------
115121
| View folder path
116122
|--------------------------------------------------------------------------
117123
|
118124
| Sets the folder where views will be stored under /resources/views
119125
|
120126
*/
121-
'view_path' => 'storyblok.',
127+
'view_path' => 'storyblok.',
122128

123-
/*
129+
/*
124130
|--------------------------------------------------------------------------
125131
| Webhook secret
126132
|--------------------------------------------------------------------------
@@ -129,7 +135,7 @@
129135
| https://www.storyblok.com/docs/guide/in-depth/webhooks
130136
|
131137
*/
132-
'webhook_secret' => env('STORYBLOK_WEBHOOK_SECRET'),
138+
'webhook_secret' => env('STORYBLOK_WEBHOOK_SECRET'),
133139

134140
/*
135141
|--------------------------------------------------------------------------
@@ -152,26 +158,26 @@
152158
*/
153159
'image_service_domain' => env('STORYBLOK_IMAGE_SERVICE_DOMAIN', 'a.storyblok.com'),
154160

155-
/*
156-
|--------------------------------------------------------------------------
157-
| Image transformation driver
158-
|--------------------------------------------------------------------------
159-
|
160-
| The class used for transforming images Fields / image URLs
161-
|
162-
*/
163-
'image_transformer' => \Riclep\Storyblok\Support\ImageTransformers\Storyblok::class,
164-
165-
/*
166-
|--------------------------------------------------------------------------
167-
| Resolve story links in content
168-
|--------------------------------------------------------------------------
169-
|
170-
| Resolve links to stories when using link and multi link fields, valid
171-
| settings are 'url', 'story' or false
172-
|
173-
*/
174-
'resolve_links' => false,
161+
/*
162+
|--------------------------------------------------------------------------
163+
| Image transformation driver
164+
|--------------------------------------------------------------------------
165+
|
166+
| The class used for transforming images Fields / image URLs
167+
|
168+
*/
169+
'image_transformer' => \Riclep\Storyblok\Support\ImageTransformers\Storyblok::class,
170+
171+
/*
172+
|--------------------------------------------------------------------------
173+
| Resolve story links in content
174+
|--------------------------------------------------------------------------
175+
|
176+
| Resolve links to stories when using link and multi link fields, valid
177+
| settings are 'url', 'story' or false
178+
|
179+
*/
180+
'resolve_links' => false,
175181

176182
/*
177183
|--------------------------------------------------------------------------
@@ -193,13 +199,13 @@
193199
*/
194200
'live_element' => '.storyblok-live',
195201

196-
/*
197-
|--------------------------------------------------------------------------
198-
| Name of the field to be used for settings
199-
|--------------------------------------------------------------------------
200-
|
201-
| Set the field name to be used to store the generic settings components
202-
|
203-
*/
204-
'settings_field' => 'settings',
202+
/*
203+
|--------------------------------------------------------------------------
204+
| Name of the field to be used for settings
205+
|--------------------------------------------------------------------------
206+
|
207+
| Set the field name to be used to store the generic settings components
208+
|
209+
*/
210+
'settings_field' => 'settings',
205211
];

src/StoryblokServiceProvider.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ public function register()
6666
}
6767
}
6868

69-
// register the Storyblok client, checking if we are in edit more of the dev requests draft content
70-
if (config('storyblok.draft')) {
71-
$client = new Client(config('storyblok.api_preview_key'), "api.storyblok.com", "v1", config('storyblok.use_ssl'));
72-
} else {
73-
$client = new Client(config('storyblok.api_public_key'), "api.storyblok.com", "v1", config('storyblok.use_ssl'));
74-
}
69+
// register the Storyblok client, checking if we are in edit more of the dev requests draft content
70+
$client = new Client(
71+
config('storyblok.draft') ? config('storyblok.api_preview_key') : config('storyblok.api_public_key'),
72+
"api.storyblok.com", "v2", config('storyblok.use_ssl'), config('storyblok.api_region')
73+
);
7574

7675
// if we’re in Storyblok’s edit mode let’s save that in the config for easy access
7776
$client->editMode(config('storyblok.draft'));

0 commit comments

Comments
 (0)