@kvasar/openclaw-storyblok-plugin 0.2.6 → 0.2.7
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/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-storyblok",
|
|
3
3
|
"name": "Storyblok Integration",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.7",
|
|
5
5
|
"description": "Provides tools to interact with Storyblok CMS via Management API and Delivery API. Supports stories, components, and space management.",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": false
|
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ Non-obvious behaviors that cause silent mistakes:
|
|
|
23
23
|
- **`content` is a reserved component name.** Component `name` must be snake_case and must not be `content` alone.
|
|
24
24
|
- **`force_update=true` causes a content conflict** if another user has the story open. Use only when necessary.
|
|
25
25
|
- **Never create separate stories per language.** Always use field-level i18n keys inside the same story.
|
|
26
|
+
- **Storyblok rich text fields are structured JSON objects, not strings.** Always preserve the complete Storyblok rich text schema (including `_uid`, `type`, `content`, and other properties). Never stringify rich text content before sending it to the Management API. This applies to both standard and translated rich text fields (`field_i18n_xx`).
|
|
26
27
|
- **Never use `storyblok_update_story` to add language translations.** Use `storyblok_update_component` instead: fetch components with `storyblok_get_components`, iterate each relevant one with `storyblok_get_component`, add new `field_i18n_xx` keys, and call `storyblok_update_component`. Never remove existing translation keys unless the user explicitly asks.
|
|
27
28
|
|
|
28
29
|
---
|
|
@@ -50,6 +51,8 @@ Non-obvious behaviors that cause silent mistakes:
|
|
|
50
51
|
### Content Management
|
|
51
52
|
|
|
52
53
|
1. If content type is unknown, run `storyblok_get_components` first.
|
|
54
|
+
2. Build `content` as a structured object matching the component schema. For rich text fields (`type: "richtext"`), ensure the value is a valid Storyblok rich text JSON object with properties like `_uid`, `type`, `content`, etc. — never a plain string.
|
|
55
|
+
3. Create or update the story.
|
|
53
56
|
2. Use `storyblok_update_story` only to change story structure — adding/removing/reordering components or blocks. Always fetch first with `storyblok_get_story`, merge, then send the full object. Never use it for translations or field edits.
|
|
54
57
|
3. For partial schema changes (add a field, rename a label), use `storyblok_update_component` instead — it patches only what you pass.
|
|
55
58
|
4. Publish only on explicit user confirmation.
|