@storyblok/astro 2.0.15 → 2.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ export default defineConfig({
|
|
|
63
63
|
|
|
64
64
|
### Options
|
|
65
65
|
|
|
66
|
-
When you initialize the integration, you can pass all [_@storyblok/js_ options](https://github.com/storyblok/storyblok-js#features-and-api).
|
|
66
|
+
When you initialize the integration, you can pass all [_@storyblok/js_ options](https://github.com/storyblok/storyblok-js#features-and-api).
|
|
67
67
|
|
|
68
68
|
```js
|
|
69
69
|
// Defaults
|
|
@@ -71,12 +71,31 @@ storyblok({
|
|
|
71
71
|
accessToken: "<your-access-token>",
|
|
72
72
|
bridge: true,
|
|
73
73
|
apiOptions: {}, // storyblok-js-client options
|
|
74
|
+
components: {},
|
|
74
75
|
useCustomApi: false,
|
|
75
76
|
});
|
|
76
77
|
```
|
|
77
78
|
|
|
78
79
|
> Note: By default, the apiPlugin from `@storyblok/js` is loaded. If you want to use your own method to fetch data from Storyblok, you can disable this behavior by setting `useCustomApi` to `true`, resulting in an optimized final bundle.
|
|
79
80
|
|
|
81
|
+
#### Region parameter
|
|
82
|
+
Possible values:
|
|
83
|
+
- `eu` (default): For spaces created in the EU
|
|
84
|
+
- `us`: For spaces created in the US
|
|
85
|
+
- `cn`: For spaces created in China
|
|
86
|
+
|
|
87
|
+
Full example for a space created in the US:
|
|
88
|
+
```js
|
|
89
|
+
storyblok({
|
|
90
|
+
accessToken: "<your-access-token>",
|
|
91
|
+
apiOptions: {
|
|
92
|
+
region: 'us'
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
> Note: For spaces created in the United States or China, the `region` parameter **must** be specified.
|
|
98
|
+
|
|
80
99
|
## Getting started
|
|
81
100
|
|
|
82
101
|
### 1. Creating and linking your components to the Storyblok Visual Editor
|
|
@@ -262,6 +281,9 @@ const renderedRichText = renderRichText(blok.text, {
|
|
|
262
281
|
|
|
263
282
|
Returns the instance of the `storyblok-js-client`.
|
|
264
283
|
|
|
284
|
+
## The Storyblok JavaScript SDK Ecosystem
|
|
285
|
+

|
|
286
|
+
|
|
265
287
|
## Acknowledgements
|
|
266
288
|
|
|
267
289
|
A huge thank you goes to the Astro Team. In particular to [Tony Sullivan](https://github.com/tony-sull), who has provided extraordinary support and made _automagically_ rendering Storyblok components a reality.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyblok/astro",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
4
4
|
"description": "Official Astro integration for the Storyblok Headless CMS",
|
|
5
5
|
"main": "./dist/storyblok-astro.js",
|
|
6
6
|
"module": "./dist/storyblok-astro.mjs",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"prepublishOnly": "npm run build && cp ../README.md ./"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@storyblok/js": "^2.1.
|
|
31
|
+
"@storyblok/js": "^2.1.3",
|
|
32
32
|
"camelcase": "^7.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@cypress/vite-dev-server": "^5.0.4",
|
|
36
36
|
"@rollup/plugin-dynamic-import-vars": "^2.0.3",
|
|
37
37
|
"@types/node": "18.15.11",
|
|
38
|
-
"astro": "2.1.
|
|
38
|
+
"astro": "2.1.8",
|
|
39
39
|
"cypress": "^12.9.0",
|
|
40
40
|
"eslint-plugin-cypress": "^2.12.1",
|
|
41
41
|
"start-server-and-test": "^2.0.0",
|
|
42
42
|
"typescript": "4.9.5",
|
|
43
|
-
"vite": "^4.1
|
|
43
|
+
"vite": "^4.2.1",
|
|
44
44
|
"vite-plugin-dts": "^2.1.0"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|