@se-studio/skills 1.7.14 → 1.7.15
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ description: Guidelines for authoring HTML content in HtmlComponent CMS entries.
|
|
|
4
4
|
license: Private
|
|
5
5
|
metadata:
|
|
6
6
|
author: se-core-product
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.2.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# HtmlComponent Authoring Guide
|
|
@@ -258,6 +258,12 @@ Put third-party libraries in **`externalScripts`**, not `createElement('script')
|
|
|
258
258
|
|
|
259
259
|
The renderer waits until those scripts have loaded (`next/script` `onReady`) before running `customJs`. The same URL on two HtmlComponents shares one `next/script` id (`hc-ext-<hash>`). If the site has a Content-Security-Policy, allowlisted hosts must match `script-src`.
|
|
260
260
|
|
|
261
|
+
In cms-edit, `externalScripts` is an Array of Symbol — set it with `--json`, never a scalar string:
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
cms_edit ["set", "@cN", "externalScripts", "--json", "[\"/html-components/feature/lib.js\"]"]
|
|
265
|
+
```
|
|
266
|
+
|
|
261
267
|
---
|
|
262
268
|
|
|
263
269
|
## Common Patterns
|
|
@@ -88,6 +88,7 @@ Standard order when diff shows these gaps:
|
|
|
88
88
|
| 6 | `17-add-article-authors.js` | `article.authors` array + backfill from `author` |
|
|
89
89
|
| 7 | `21-add-article-bottom-content.js` | `article.bottomContent` array (idempotent; clones `content` link types) |
|
|
90
90
|
| 8 | `25-add-meta-field.js` | Optional Long text `meta` JSON bag on template/page/article/tag/person and related types. Idempotent. Unused until filled. |
|
|
91
|
+
| 9 | `28-add-html-component-external-scripts.js` | Optional `externalScripts` (array of URL strings) on existing `htmlComponent`. Idempotent. Greenfield spaces that run migration 12 after this change already get the field. |
|
|
91
92
|
|
|
92
93
|
Site-specific (run only when diff shows missing field **and** app uses it):
|
|
93
94
|
|