@se-studio/skills 1.0.38 → 1.0.40
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 +24 -0
- package/package.json +1 -1
- package/skills/contentful-cms-alt-text-audit/SKILL.md +1 -1
- package/skills/contentful-cms-core/SKILL.md +39 -30
- package/skills/contentful-cms-navigation/SKILL.md +3 -3
- package/skills/contentful-cms-schema-org/SKILL.md +2 -1
- package/skills/contentful-cms-seo-descriptions/SKILL.md +1 -1
- package/skills/contentful-cms-sync-schema/SKILL.md +132 -0
- package/skills/contentful-cms-templates/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @se-studio/skills
|
|
2
2
|
|
|
3
|
+
## 1.0.40
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add ordered `article.authors` CMS field support (first author = primary) with shared helpers in `@se-studio/core-data-types`: `getArticleAuthors`, `getPrimaryArticleAuthor`, `formatArticleAuthorNames`, and `normalizeResolvedArticleAuthors`. Legacy single `author` remains populated as `authors[0]` during migration.
|
|
8
|
+
|
|
9
|
+
**@se-studio/contentful-rest-api** — Resolve and normalize `authors` on full articles and article links; include `fields.authors` in link-only fetches. Related-articles scoring matches any listed co-author.
|
|
10
|
+
|
|
11
|
+
**@se-studio/core-ui** — Structured data context exposes multi-author JSON-LD (`article.authors`); related-articles fallback uses all article authors. Omits authors without a display name.
|
|
12
|
+
|
|
13
|
+
**@se-studio/search** / **@se-studio/markdown-renderer** — Index and export comma-separated multi-author bylines via `formatArticleAuthorNames`.
|
|
14
|
+
|
|
15
|
+
**@se-studio/contentful-cms** — Fetch and audit entry trees traverse `authors` links; shared `linkedEntryFields` module deduplicates traversal logic.
|
|
16
|
+
|
|
17
|
+
**@se-studio/skills** — Add `contentful-cms-sync-schema` skill; document multi-author Schema.org variables.
|
|
18
|
+
|
|
19
|
+
Run migration `scripts/migrations/17-add-article-authors.js` on live spaces after deploying packages.
|
|
20
|
+
|
|
21
|
+
## 1.0.39
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Bulk version bump: patch for all packages
|
|
26
|
+
|
|
3
27
|
## 1.0.38
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ If no brand context is available, ask the user about any brand-specific terms be
|
|
|
17
17
|
|
|
18
18
|
1. **Get all pages**: `cms-edit sitemap`
|
|
19
19
|
2. **For each page** (or a specific page if the user specified one):
|
|
20
|
-
a. `cms-edit open /<slug>`
|
|
20
|
+
a. `cms-edit open --page-slug /<slug>` (or `--article-slug` for articles)
|
|
21
21
|
b. `cms-edit snapshot` — identify components with visual/image/media fields
|
|
22
22
|
c. For each image-bearing component:
|
|
23
23
|
- `cms-edit read @ref` to inspect fields
|
|
@@ -40,20 +40,23 @@ To get the path to the full README (e.g. for an LLM to read): `cms-edit --docs`
|
|
|
40
40
|
### Step 1: Open a page
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
# By slug
|
|
44
|
-
cms-edit open /pricing
|
|
43
|
+
# By page slug (trailing slash OK)
|
|
44
|
+
cms-edit open --page-slug /pricing
|
|
45
|
+
|
|
46
|
+
# By page cmsLabel (when editors use cmsLabel heavily)
|
|
47
|
+
cms-edit open --page-cms-label "Pricing page"
|
|
45
48
|
|
|
46
49
|
# By slug with explicit space
|
|
47
|
-
cms-edit --space om1 open /pricing
|
|
50
|
+
cms-edit --space om1 open --page-slug /pricing
|
|
48
51
|
|
|
49
52
|
# By Contentful entry ID
|
|
50
|
-
cms-edit open
|
|
53
|
+
cms-edit open --id 4xKj2abcDef
|
|
51
54
|
|
|
52
55
|
# Home page (slug is 'index')
|
|
53
|
-
cms-edit open /
|
|
56
|
+
cms-edit open --page-slug /
|
|
54
57
|
```
|
|
55
58
|
|
|
56
|
-
**
|
|
59
|
+
**Flat lookup flags:** provide **exactly one** primary flag per `open` / `resolve` / `nav open`. See `cms-edit help lookup`. Run `cms-edit index sync` so catalog types resolve from the local index.
|
|
57
60
|
|
|
58
61
|
### Step 2: Read the snapshot
|
|
59
62
|
|
|
@@ -236,7 +239,7 @@ Same as Component plus:
|
|
|
236
239
|
|
|
237
240
|
When adding body content and a CTA (e.g. PDF download) to an article:
|
|
238
241
|
|
|
239
|
-
1. `cms-edit open
|
|
242
|
+
1. `cms-edit open --article-slug <slug>` (or `open --id <id>`)
|
|
240
243
|
2. Set body: `cms-edit rtf @<ref> body --markdown "..."` or `--markdown --file path/to.md`. If you need to add a body component first, use `add` then `rtf`.
|
|
241
244
|
3. `cms-edit add CTA --target bottomContent`
|
|
242
245
|
4. Set CTA links: use `--type external --label "Download PDF" --href <url>` for an external PDF URL, or `--type download --label "Download PDF" --asset-id <asset-id>` for a Contentful asset (get the ID from `cms-edit asset search "..."` or `asset info <id>`).
|
|
@@ -341,13 +344,14 @@ cms-edit set @c5 links linkId4 --links --append
|
|
|
341
344
|
|
|
342
345
|
## Assets
|
|
343
346
|
|
|
344
|
-
**Content index:** Run `cms-edit index sync` once per space before asset search, media-by-filename list, asset audit, or `--if-exists-by-filename`. The same sync
|
|
347
|
+
**Content index:** Run `cms-edit index sync` once per space before asset search, media-by-filename list, asset audit, or `--if-exists-by-filename`. The same sync indexes the full **content catalog** (pages, articles, taxonomy, navigation, templates) for fast `list`, `open`, and `resolve`. Default sync uses the **Preview API** (draft content). See `cms-edit help index-sync` and `cms-edit help lookup`.
|
|
345
348
|
|
|
346
349
|
```bash
|
|
347
350
|
cms-edit index sync
|
|
348
351
|
cms-edit index status
|
|
352
|
+
cms-edit list --type page
|
|
349
353
|
cms-edit list --type template
|
|
350
|
-
cms-edit resolve --type
|
|
354
|
+
cms-edit resolve --tag-type-slug topic
|
|
351
355
|
|
|
352
356
|
# Published-only index (optional)
|
|
353
357
|
cms-edit index sync --published
|
|
@@ -381,8 +385,8 @@ JSON output for upload (`CMS_EDIT_JSON=1`): `{ ok, id, fileName, url, mediaId?,
|
|
|
381
385
|
## Navigation
|
|
382
386
|
|
|
383
387
|
```bash
|
|
384
|
-
# Open a navigation entry
|
|
385
|
-
cms-edit nav open
|
|
388
|
+
# Open a navigation entry (navigation uses `name`, not slug)
|
|
389
|
+
cms-edit nav open --nav-name "Main navigation"
|
|
386
390
|
|
|
387
391
|
# Add a new item
|
|
388
392
|
cms-edit nav add --label "Pricing" --slug /pricing
|
|
@@ -414,7 +418,10 @@ cms-edit create article --slug /blog/my-post --title "My Post" --article-type-id
|
|
|
414
418
|
# Create taxonomy entries (draft only)
|
|
415
419
|
cms-edit create tag-type --slug conference-venue --name "Conference Venue"
|
|
416
420
|
cms-edit create article-type --slug resources/publications --name "Publications"
|
|
417
|
-
cms-edit create tag --slug poster-presentation --name "Poster Presentation" --tag-type presentation-type
|
|
421
|
+
cms-edit create tag --slug poster-presentation --name "Poster Presentation" --tag-type-slug presentation-type
|
|
422
|
+
# cmsLabel defaults to "<tagType name> — <tag name>" when --cms-label omitted
|
|
423
|
+
cms-edit create tag --slug easl-congress-2026 --name "EASL Congress 2026" --tag-type publication-source \
|
|
424
|
+
--description "Research presented at EASL Congress 2026." --featured-image <logoAssetId>
|
|
418
425
|
|
|
419
426
|
# Full fields via JSON
|
|
420
427
|
cms-edit create tag --json-file tag.json --tag-type presentation-type --if-not-exists
|
|
@@ -424,7 +431,8 @@ cms-edit create taxonomy-from-json --file taxonomy.json --if-not-exists
|
|
|
424
431
|
|
|
425
432
|
# Idempotent single-entry creates
|
|
426
433
|
cms-edit ensure tag-type --slug conference-venue --name "Conference Venue"
|
|
427
|
-
cms-edit ensure tag --slug asco-2025 --name "ASCO 2025" --tag-type conference-venue
|
|
434
|
+
cms-edit ensure tag --slug asco-2025 --name "ASCO 2025" --tag-type conference-venue \
|
|
435
|
+
--description "Annual ASCO conference." --featured-image <logoAssetId>
|
|
428
436
|
```
|
|
429
437
|
|
|
430
438
|
See `cms-edit help fields-taxonomy` and `cms-edit help taxonomy-from-json` for field reference and batch schema.
|
|
@@ -433,10 +441,11 @@ See `cms-edit help fields-taxonomy` and `cms-edit help taxonomy-from-json` for f
|
|
|
433
441
|
|
|
434
442
|
```bash
|
|
435
443
|
# Resolve taxonomy IDs without a session
|
|
436
|
-
cms-edit resolve --
|
|
444
|
+
cms-edit resolve --tag-type-slug presentation-type
|
|
445
|
+
cms-edit resolve --tag-name "ASCO 2025" --tag-type-name "Conference Venue"
|
|
437
446
|
```
|
|
438
447
|
|
|
439
|
-
|
|
448
|
+
Use flat flags: `--page-slug`, `--article-cms-label`, `--tag-slug`, `--template-label`, etc. (`cms-edit help lookup`).
|
|
440
449
|
|
|
441
450
|
## Search and Discovery
|
|
442
451
|
|
|
@@ -455,11 +464,11 @@ cms-edit list --type article --slug my-article # article with a specific slug
|
|
|
455
464
|
cms-edit list --type article --has-field tags # articles where tags field is non-empty
|
|
456
465
|
|
|
457
466
|
# Resolve any entry or asset by ID (no open session required)
|
|
458
|
-
cms-edit resolve 4xKj2abcDefGhijK
|
|
459
|
-
cms-edit resolve 7pQrStuvWxyzAbc
|
|
460
|
-
cms-edit resolve --type
|
|
461
|
-
cms-edit resolve --
|
|
462
|
-
cms-edit resolve
|
|
467
|
+
cms-edit resolve --id 4xKj2abcDefGhijK # entry: shows type, title, slug, status
|
|
468
|
+
cms-edit resolve --id 7pQrStuvWxyzAbc # asset: shows title, fileName, URL
|
|
469
|
+
cms-edit resolve --tag-type-slug presentation-type
|
|
470
|
+
cms-edit resolve --tag-slug asco-2025 --tag-type-slug conference-venue
|
|
471
|
+
cms-edit resolve --tag-type-slug presentation-type --json
|
|
463
472
|
|
|
464
473
|
# Find Media entries by asset
|
|
465
474
|
cms-edit list --type media --asset-id 7pQrStuvWxyzAbc
|
|
@@ -479,8 +488,8 @@ cms-edit resolve <tag-entry-id>
|
|
|
479
488
|
|
|
480
489
|
```bash
|
|
481
490
|
# Specify space explicitly
|
|
482
|
-
cms-edit --space brightline open /home
|
|
483
|
-
cms-edit --space om1 open /pricing
|
|
491
|
+
cms-edit --space brightline open --page-slug /home
|
|
492
|
+
cms-edit --space om1 open --page-slug /pricing
|
|
484
493
|
```
|
|
485
494
|
|
|
486
495
|
Or set `CMS_EDIT_SPACE=om1` environment variable.
|
|
@@ -489,7 +498,7 @@ Or set `CMS_EDIT_SPACE=om1` environment variable.
|
|
|
489
498
|
|
|
490
499
|
```bash
|
|
491
500
|
# 1. Open the page
|
|
492
|
-
cms-edit open /about-us
|
|
501
|
+
cms-edit open --page-slug /about-us
|
|
493
502
|
|
|
494
503
|
# 2. Find the hero component
|
|
495
504
|
cms-edit snapshot
|
|
@@ -515,7 +524,7 @@ cms-edit save
|
|
|
515
524
|
|
|
516
525
|
### Update an existing article
|
|
517
526
|
```bash
|
|
518
|
-
cms-edit open /blog/old-title
|
|
527
|
+
cms-edit open --article-slug /blog/old-title # or cms-edit open --id <id>
|
|
519
528
|
cms-edit set @p0 title "New Article Title" # @p0 works in article sessions too
|
|
520
529
|
cms-edit set @p0 slug new-article-slug
|
|
521
530
|
cms-edit set @p0 description "Updated description"
|
|
@@ -524,7 +533,7 @@ cms-edit save
|
|
|
524
533
|
|
|
525
534
|
### Add a new section to a page
|
|
526
535
|
```bash
|
|
527
|
-
cms-edit open /products
|
|
536
|
+
cms-edit open --page-slug /products
|
|
528
537
|
cms-edit types component # discover what's available
|
|
529
538
|
cms-edit add CTA --after @c3
|
|
530
539
|
cms-edit set @c4 heading "Ready to get started?"
|
|
@@ -535,7 +544,7 @@ cms-edit save
|
|
|
535
544
|
|
|
536
545
|
### Reorder page sections
|
|
537
546
|
```bash
|
|
538
|
-
cms-edit open /home
|
|
547
|
+
cms-edit open --page-slug /home
|
|
539
548
|
cms-edit snapshot # see current order
|
|
540
549
|
cms-edit move @c3 --after @c1 # move section 3 to position 2
|
|
541
550
|
cms-edit save
|
|
@@ -682,8 +691,8 @@ cms-edit sitemap --include page,article # Include articles too
|
|
|
682
691
|
Inspect a page without affecting your active session.
|
|
683
692
|
|
|
684
693
|
```bash
|
|
685
|
-
cms-edit peek /pricing # Show snapshot of /pricing; your active session is unchanged
|
|
686
|
-
cms-edit peek <
|
|
694
|
+
cms-edit peek --page-slug /pricing # Show snapshot of /pricing; your active session is unchanged
|
|
695
|
+
cms-edit peek --id <entryId> # Look up by entry ID
|
|
687
696
|
```
|
|
688
697
|
|
|
689
698
|
## Batch Operations (run)
|
|
@@ -864,8 +873,8 @@ cms-edit sitemap --include page,article # Include articles
|
|
|
864
873
|
Use `--session <name>` or `CONTENTFUL_CMS_SESSION=<name>` to isolate parallel workflows.
|
|
865
874
|
|
|
866
875
|
```bash
|
|
867
|
-
cms-edit --session agent-1 open /pricing
|
|
868
|
-
cms-edit --session agent-2 open /blog
|
|
876
|
+
cms-edit --session agent-1 open --page-slug /pricing
|
|
877
|
+
cms-edit --session agent-2 open --article-slug /blog
|
|
869
878
|
```
|
|
870
879
|
|
|
871
880
|
## Related skills
|
|
@@ -10,7 +10,7 @@ Use this skill when creating or editing **navigation** entries and their items i
|
|
|
10
10
|
## Workflow
|
|
11
11
|
|
|
12
12
|
1. **Create** a navigation: `cms-edit create navigation --label 'Main menu'`
|
|
13
|
-
2. **Open** the nav: `cms-edit nav open
|
|
13
|
+
2. **Open** the nav: `cms-edit nav open --nav-name "Main menu"` or `cms-edit nav open --nav-id <id>` (printed after create/clone)
|
|
14
14
|
3. **Add items** (new or existing):
|
|
15
15
|
```bash
|
|
16
16
|
# Create a new nav item with a page link
|
|
@@ -48,7 +48,7 @@ This creates new copies of every NavigationItem and links them into the new navi
|
|
|
48
48
|
In a navigation session, the root navigation entry is **`@c0`** (or the universal alias **`@root`**). The `@p0` alias only works in page/article sessions.
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
cms-edit nav open
|
|
51
|
+
cms-edit nav open --nav-name "Main menu"
|
|
52
52
|
cms-edit snapshot # root is @c0; items are @c1, @c2, …
|
|
53
53
|
cms-edit read @root # same as @c0
|
|
54
54
|
```
|
|
@@ -73,7 +73,7 @@ cms-edit set @c0 visual <media-entry-id> --link
|
|
|
73
73
|
Navigation entries are often linked from templates as **menu** or **footer**:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
cms-edit open <template-id>
|
|
76
|
+
cms-edit open --id <template-id>
|
|
77
77
|
cms-edit set @root menu <nav-entry-id> --link
|
|
78
78
|
cms-edit set @root footer <footer-nav-id> --link
|
|
79
79
|
cms-edit save
|
|
@@ -42,7 +42,8 @@ Create JSON-LD templates using these standard Mustache variables:
|
|
|
42
42
|
- `{{slug}}` — page slug
|
|
43
43
|
- `{{publishDate}}` — article publish date
|
|
44
44
|
- `{{updatedAt}}` — last modification date
|
|
45
|
-
- `{{authorName}}` — article author name
|
|
45
|
+
- `{{authorName}}` — primary article author name (first in `authors`)
|
|
46
|
+
- `{{#article.authors}}` — multi-author JSON-LD (`name`, `url` per author)
|
|
46
47
|
- `{{heroImageUrl}}` — primary image URL
|
|
47
48
|
- `{{customerName}}` — from brand context
|
|
48
49
|
- `{{siteUrl}}` — from brand context
|
|
@@ -19,7 +19,7 @@ If no brand context is available, ask the user about their brand voice and targe
|
|
|
19
19
|
2. **For each page** (or a specific page):
|
|
20
20
|
a. **Read page content** using `fetch_page_markdown` (from the site-workflows MCP server) to understand what the page covers
|
|
21
21
|
b. **Check current SEO**:
|
|
22
|
-
- `cms-edit open /<slug>`
|
|
22
|
+
- `cms-edit open --page-slug /<slug>` (or `--article-slug` for articles)
|
|
23
23
|
- `cms-edit read @page seoDescription` (or `read @page` for all fields)
|
|
24
24
|
c. **Analyse** the page — primary purpose, problem it solves, desired user action
|
|
25
25
|
d. **Generate** a meta description following the guidelines below
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: contentful-cms-sync-schema
|
|
3
|
+
description: "Audit Contentful schema drift vs golden export, write descriptive diff reports, and build migration runbooks. Use when syncing a customer space to core schema or before running scripts/migrations."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sync Contentful schema to core
|
|
7
|
+
|
|
8
|
+
Use when a customer Contentful space should match the **structural** core schema (content types, fields, non-enum validations). Do **not** use for full enum alignment of `componentType` / `collectionType` — each site keeps its own component names.
|
|
9
|
+
|
|
10
|
+
## Golden reference
|
|
11
|
+
|
|
12
|
+
| Artifact | Purpose |
|
|
13
|
+
|----------|---------|
|
|
14
|
+
| `docs/schema-export.json` | Structural golden (Pedestal `h4s3ip99qawo` / `master`) |
|
|
15
|
+
| `docs/blank-schema.json` | New-project **bootstrap only** — not the sync target |
|
|
16
|
+
|
|
17
|
+
Refresh golden:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
contentful space export \
|
|
21
|
+
--space-id h4s3ip99qawo \
|
|
22
|
+
--environment-id master \
|
|
23
|
+
--management-token "$CONTENTFUL_MANAGEMENT_TOKEN" \
|
|
24
|
+
--skip-content --skip-webhooks --skip-roles --skip-tags \
|
|
25
|
+
--content-file docs/schema-export.json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
### 1. Resolve target space
|
|
31
|
+
|
|
32
|
+
From the app’s `.env.local`:
|
|
33
|
+
|
|
34
|
+
- `CONTENTFUL_SPACE_ID`
|
|
35
|
+
- `CONTENTFUL_ENVIRONMENT_NAME` (or `CONTENTFUL_ENVIRONMENT`)
|
|
36
|
+
|
|
37
|
+
Use `CONTENTFUL_MANAGEMENT_TOKEN` from the environment (global).
|
|
38
|
+
|
|
39
|
+
### 2. Export target schema
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
contentful space export \
|
|
43
|
+
--space-id "$CONTENTFUL_SPACE_ID" \
|
|
44
|
+
--environment-id "$CONTENTFUL_ENVIRONMENT_NAME" \
|
|
45
|
+
--management-token "$CONTENTFUL_MANAGEMENT_TOKEN" \
|
|
46
|
+
--skip-content --skip-webhooks --skip-roles --skip-tags \
|
|
47
|
+
--content-file docs/schema-audit/<site>.json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 3. Mechanical compare
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
node scripts/compare-contentful-schema.mjs \
|
|
54
|
+
--golden docs/schema-export.json \
|
|
55
|
+
--target docs/schema-audit/<site>.json \
|
|
56
|
+
--out docs/schema-audit/<site>-diff.json \
|
|
57
|
+
--summary docs/schema-audit/<site>-summary.md
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Read `<site>-diff.json`. Enum-only diffs on `componentType`, `collectionType`, `externalComponentType` are **informational**.
|
|
61
|
+
|
|
62
|
+
### 4. Write descriptive report
|
|
63
|
+
|
|
64
|
+
Create or update **`docs/schema-audit/<site>.md`** with:
|
|
65
|
+
|
|
66
|
+
1. **Summary** — space id, environment, counts; what is safe to auto-migrate vs needs review.
|
|
67
|
+
2. **Missing content types** — purpose, editor impact, migration script.
|
|
68
|
+
3. **Missing fields** — per field: type, why golden has it (use `scripts/schema-descriptions-data.js`, `specs/CONTENT_MODEL.md`), suggested migration from `scripts/migrations/`.
|
|
69
|
+
4. **Extra types/fields** — site-specific; **keep** unless product says remove (e.g. Brightline analytics fields).
|
|
70
|
+
5. **Field mismatches** — non-enum differences (colour palettes, RTF validations). Usually **optional** alignment; do not block structural migrations.
|
|
71
|
+
6. **Migration runbook** — ordered list with dry-run commands (see below).
|
|
72
|
+
7. **Post-migration checks** — re-export, re-compare, `pnpm generate:types`, `cms-edit schema component`.
|
|
73
|
+
|
|
74
|
+
### 5. Apply migrations (human approval)
|
|
75
|
+
|
|
76
|
+
**Never** `contentful space import` a full export onto a live space with content (webhook 409s, enum risk). Use **`contentful space migration`** only.
|
|
77
|
+
|
|
78
|
+
Standard order when diff shows these gaps:
|
|
79
|
+
|
|
80
|
+
| Order | Script | Adds |
|
|
81
|
+
|-------|--------|------|
|
|
82
|
+
| 1 | `12-add-html-component.js` | `htmlComponent` content type + array link validations |
|
|
83
|
+
| 2 | `13-add-tag-type-fields.js` | TagType index page fields (includes `htmlComponent` in topContent) |
|
|
84
|
+
| 2b | `13-add-tag-type-fields-no-html.js` | Same as 13 **without** `htmlComponent` in topContent — use for Brightline / BLK while htmlComponent is WIP |
|
|
85
|
+
| 3 | `14-add-tag-show-field.js` | `show` on tag / tagType |
|
|
86
|
+
| 4 | `16-add-navigation-item-long-text.js` | `navigationItem.longText` |
|
|
87
|
+
| 5 | `15-add-slug-regexp-validation.js` | Slug format validation |
|
|
88
|
+
| 6 | `17-add-article-authors.js` | `article.authors` array + backfill from `author` |
|
|
89
|
+
|
|
90
|
+
Site-specific (run only when diff shows missing field **and** app uses it):
|
|
91
|
+
|
|
92
|
+
| Script | Scope |
|
|
93
|
+
|--------|--------|
|
|
94
|
+
| `02-add-breadcrumb-title.js` | breadcrumbTitle on page/article/tag/custom |
|
|
95
|
+
| `05-add-phone-number-brightline.js` | **Brightline spaces only** |
|
|
96
|
+
| `06-add-tracking-event-name-brightline.js` | **Brightline spaces only** |
|
|
97
|
+
| `03`–`11`, `07`–`10` | External component / link extensions — check diff |
|
|
98
|
+
|
|
99
|
+
Gaps with **no** script (e.g. `navigationItem.longText`, `media.gradient` on Pedestal): flag in report; add `scripts/migrations/16+` before applying if required.
|
|
100
|
+
|
|
101
|
+
Dry-run:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
contentful space migration \
|
|
105
|
+
--space-id "$CONTENTFUL_SPACE_ID" \
|
|
106
|
+
--environment-id "$CONTENTFUL_ENVIRONMENT_NAME" \
|
|
107
|
+
--management-token "$CONTENTFUL_MANAGEMENT_TOKEN" \
|
|
108
|
+
scripts/migrations/12-add-html-component.js
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Remove dry-run flags only after reviewing output. Re-run compare until **missing types/fields** are cleared (extras and enum diffs may remain).
|
|
112
|
+
|
|
113
|
+
### 6. App follow-up
|
|
114
|
+
|
|
115
|
+
In the customer app directory:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
pnpm generate:types
|
|
119
|
+
pnpm type-check
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Safety rules
|
|
123
|
+
|
|
124
|
+
- Do **not** shrink `componentType` / `collectionType` `in` lists on live spaces.
|
|
125
|
+
- Migration **15** does not fix existing invalid slug **entries** — editors must fix on save.
|
|
126
|
+
- Legacy media spaces (separate `video` / `illustration` types instead of `media`) need a **separate** consolidation project — not this skill’s default scope.
|
|
127
|
+
|
|
128
|
+
## Related docs
|
|
129
|
+
|
|
130
|
+
- `docs/DEVELOPMENT.md` — Contentful migrations section
|
|
131
|
+
- `docs/schema-audit/README.md` — artifact layout
|
|
132
|
+
- `site-workflows-project-cleanup` skill — `clean-schema` for **new** empty spaces only
|
|
@@ -11,7 +11,7 @@ Use this skill when creating or editing **templates** (layout shells with preCon
|
|
|
11
11
|
|
|
12
12
|
1. **Create** a template: `cms-edit create template --label 'Campaign Landing'`
|
|
13
13
|
2. **List** templates: `cms-edit list --type template`
|
|
14
|
-
3. **Open** by ID: `cms-edit open
|
|
14
|
+
3. **Open** by cmsLabel or ID: `cms-edit open --template-label "Default"` or `cms-edit open --id <template-id>`
|
|
15
15
|
4. Edit content: set **preContent** and **postContent** (content arrays) via session snapshot refs; use `add`, `set`, `remove`, `move` as for pages. Set **menu** and **footer** (single navigation links) with `cms-edit set @ref menu <nav-entry-id> --link` and same for `footer`.
|
|
16
16
|
5. Set **colours**: `cms-edit set @ref backgroundColour Navy`, `cms-edit set @ref textColour White` (or project colour names).
|
|
17
17
|
6. **Save**: `cms-edit save`
|