@se-studio/contentful-cms 1.0.28 → 1.0.29

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
@@ -1,5 +1,11 @@
1
1
  # @se-studio/contentful-cms Changelog
2
2
 
3
+ ## 1.0.29
4
+
5
+ ### Patch Changes
6
+
7
+ - Bulk version bump: patch for all packages
8
+
3
9
  ## 1.0.27
4
10
 
5
11
  ### Patch Changes
package/INSTALL.md CHANGED
@@ -8,6 +8,9 @@ This guide sets up Claude Desktop so it can read and edit your Contentful conten
8
8
 
9
9
  - **Contentful Space ID** — a short code that identifies your project in Contentful
10
10
  - **Contentful Management Token** — a secret key that gives Claude permission to edit content
11
+ - **Staging site URL** — the Vercel preview URL for your project (e.g. `https://my-project.vercel.app`)
12
+ - **Vercel bypass token** *(optional)* — only needed if your staging site has deployment protection enabled
13
+ - **Node.js** — required for screenshot support. Download the LTS version from [nodejs.org](https://nodejs.org) if you don't have it
11
14
 
12
15
  ---
13
16
 
@@ -29,72 +32,108 @@ This guide sets up Claude Desktop so it can read and edit your Contentful conten
29
32
 
30
33
  ---
31
34
 
32
- ## Step 2 — Create your config file
35
+ ## Step 2 — Run the setup script
33
36
 
34
- You need to create a file called `.contentful-cms.json` in your home folder.
37
+ The setup script will ask for your details and configure everything automatically.
35
38
 
36
- > Your home folder is `C:\Users\YourName` on Windows, or `/Users/YourName` on Mac.
39
+ ### Windows
37
40
 
38
- Create the file with this content, replacing the placeholder values:
41
+ Open **PowerShell** (search for it in the Start menu) and paste this command:
39
42
 
40
- ```json
41
- {
42
- "defaultSpace": "my-project",
43
- "spaces": {
44
- "my-project": {
45
- "spaceId": "YOUR_SPACE_ID",
46
- "environment": "master",
47
- "managementToken": "YOUR_MANAGEMENT_TOKEN",
48
- "defaultLocale": "en-US"
49
- }
50
- }
51
- }
43
+ ```powershell
44
+ powershell -ExecutionPolicy Bypass -File "$env:USERPROFILE\Downloads\install.ps1"
45
+ ```
46
+
47
+ > First, download [install.ps1](./install.ps1) and save it to your Downloads folder.
48
+
49
+ ### Mac
50
+
51
+ Open **Terminal** (search for it in Spotlight) and paste this command:
52
+
53
+ ```bash
54
+ bash ~/Downloads/install.sh
52
55
  ```
53
56
 
54
- Replace:
55
- - `YOUR_SPACE_ID` with the Space ID from Step 1
56
- - `YOUR_MANAGEMENT_TOKEN` with the token from Step 1
57
- - `my-project` (in both places) with a short name for your project — no spaces, e.g. `om1` or `brightline`
57
+ > First, download [install.sh](./install.sh) and save it to your Downloads folder.
58
+
59
+ ### Linux
60
+
61
+ Open a terminal and paste this command:
58
62
 
59
- **On Windows:** Open Notepad, paste the content above, then save as `C:\Users\YourName\.contentful-cms.json`
60
- - In the Save dialog, set "Save as type" to **All Files** so it doesn't add `.txt`
63
+ ```bash
64
+ bash ~/Downloads/install.sh
65
+ ```
61
66
 
62
- **On Mac:** Open TextEdit, switch to plain text mode (Format → Make Plain Text), paste the content, then save as `/Users/YourName/.contentful-cms.json`
67
+ > The script automatically detects Linux and uses the correct config location (`~/.config/Claude/`).
63
68
 
64
69
  ---
65
70
 
66
- ## Step 3 Configure Claude Desktop
71
+ The script will ask you three things:
72
+ 1. A short name for your project (e.g. `my-project`) — no spaces
73
+ 2. Your Contentful Space ID
74
+ 3. Your Contentful Management Token
75
+
76
+ It will then create your config file and update Claude Desktop automatically.
67
77
 
68
- You need to tell Claude Desktop to load the CMS editor tool.
78
+ ---
69
79
 
70
- ### Find the Claude Desktop config file
80
+ ## Step 3 — Restart Claude Desktop
71
81
 
72
- **Windows:** `C:\Users\YourName\AppData\Roaming\Claude\claude_desktop_config.json`
82
+ Fully quit Claude Desktop and reopen it.
73
83
 
74
- **Mac:** `/Users/YourName/Library/Application Support/Claude/claude_desktop_config.json`
84
+ - **Mac:** Right-click the Dock icon and choose **Quit** (just closing the window isn't enough)
85
+ - **Windows/Linux:** Close the window and reopen from the Start menu / app launcher
75
86
 
76
- > On Mac, the `Library` folder is hidden. In Finder, click **Go** in the menu bar, hold **Option**, and click **Library**.
87
+ ---
77
88
 
78
- ### Edit the config file
89
+ ## Step 4 Test it
90
+
91
+ In a new Claude conversation, type:
92
+
93
+ > What Contentful spaces do you have access to?
94
+
95
+ Claude should respond with the space name you chose. If it does, you're all set.
96
+
97
+ ---
79
98
 
80
- Open the file in a text editor. If it's empty or doesn't exist, start with `{}`.
99
+ ## Manual setup (if you'd prefer not to use the script)
81
100
 
82
- Add the `mcpServers` section shown below. If the file already has content, you'll need to merge carefully — ask for help if unsure.
101
+ <details>
102
+ <summary>Click to expand manual instructions</summary>
103
+
104
+ ### Create your config file
105
+
106
+ Create a file called `.contentful-cms.json` in your home folder:
107
+ - **Windows:** `C:\Users\YourName\.contentful-cms.json`
108
+ - **Mac/Linux:** `~/.contentful-cms.json`
83
109
 
84
- **Windows:**
85
110
  ```json
86
111
  {
87
- "mcpServers": {
88
- "cms-edit": {
89
- "command": "npx",
90
- "args": ["-y", "@se-studio/contentful-cms"],
91
- "cwd": "C:\\Users\\YourName"
112
+ "defaultSpace": "my-project",
113
+ "spaces": {
114
+ "my-project": {
115
+ "spaceId": "YOUR_SPACE_ID",
116
+ "environment": "master",
117
+ "managementToken": "YOUR_MANAGEMENT_TOKEN",
118
+ "defaultLocale": "en-US"
92
119
  }
93
120
  }
94
121
  }
95
122
  ```
96
123
 
97
- **Mac:**
124
+ Replace `my-project` (both places), `YOUR_SPACE_ID`, and `YOUR_MANAGEMENT_TOKEN` with your values.
125
+
126
+ **Windows tip:** In Notepad's Save dialog, set "Save as type" to **All Files** so it doesn't add `.txt`.
127
+
128
+ ### Configure Claude Desktop
129
+
130
+ Edit the Claude Desktop config file:
131
+ - **Windows:** `C:\Users\YourName\AppData\Roaming\Claude\claude_desktop_config.json`
132
+ - **Mac:** `/Users/YourName/Library/Application Support/Claude/claude_desktop_config.json`
133
+ - **Linux:** `~/.config/Claude/claude_desktop_config.json`
134
+
135
+ Add (or merge) this into the file:
136
+
98
137
  ```json
99
138
  {
100
139
  "mcpServers": {
@@ -107,23 +146,9 @@ Add the `mcpServers` section shown below. If the file already has content, you'l
107
146
  }
108
147
  ```
109
148
 
110
- Replace `YourName` with your actual username in both `cwd` and the file path.
111
-
112
- ---
113
-
114
- ## Step 4 — Restart Claude Desktop
115
-
116
- Fully quit Claude Desktop and reopen it. On Mac, right-click the Dock icon and choose **Quit** (just closing the window isn't enough).
117
-
118
- ---
119
-
120
- ## Step 5 — Test it
121
-
122
- In a new Claude conversation, type:
123
-
124
- > What Contentful spaces do you have access to?
149
+ Replace `/Users/YourName` with your actual home folder path.
125
150
 
126
- Claude should respond with the space name you configured (e.g. `my-project`). If it does, you're all set.
151
+ </details>
127
152
 
128
153
  ---
129
154
 
@@ -1 +1 @@
1
- {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../src/commands/set.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAezC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8LzD"}
1
+ {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../src/commands/set.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAezC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2NzD"}
@@ -13,6 +13,7 @@ export function registerSetCommand(program) {
13
13
  .description('Set a field on an entry.\n' +
14
14
  'Scalar (default): pass a string, boolean, or number as <value>.\n' +
15
15
  'Object/JSON: use --file <path> to read JSON from a file, or --json <json> for inline JSON.\n' +
16
+ 'Plain text file: use --text-file <path> to read a file as a plain string (for rawHtml, customCss, etc.).\n' +
16
17
  'Entry link: use --link (value = linked entry ID).\n' +
17
18
  'Asset link: use --asset (value = asset ID).\n' +
18
19
  'Content array: use --links (value = comma-separated refs or IDs); use --append to append.\n' +
@@ -22,6 +23,7 @@ export function registerSetCommand(program) {
22
23
  .option('--links', 'Value is comma-separated refs or entry IDs; field must be topContent, content, bottomContent, or contents')
23
24
  .option('--append', 'With --links: append to existing array instead of replacing')
24
25
  .option('--file <path>', 'Read JSON from a file and set the field as an Object value')
26
+ .option('--text-file <path>', 'Read a plain text file and set the field as a Text value (for rawHtml, customCss, etc.)')
25
27
  .option('--json <json>', 'Inline JSON string to set the field as an Object value')
26
28
  .action(async (ref, field, rawValue, opts, cmd) => {
27
29
  const parentOpts = cmd.parent?.opts() ?? {};
@@ -47,6 +49,10 @@ export function registerSetCommand(program) {
47
49
  errorMsg('Cannot combine --file/--json with --link, --asset, or --links.');
48
50
  process.exit(1);
49
51
  }
52
+ if (opts.textFile && (opts.file || opts.json || opts.link || opts.asset || opts.links)) {
53
+ errorMsg('Cannot combine --text-file with --file, --json, --link, --asset, or --links.');
54
+ process.exit(1);
55
+ }
50
56
  if (opts.append && !opts.links) {
51
57
  errorMsg('--append is only valid with --links.');
52
58
  process.exit(1);
@@ -70,8 +76,21 @@ export function registerSetCommand(program) {
70
76
  : `Set ${field} on ${ref} to inline JSON object.`);
71
77
  return;
72
78
  }
79
+ if (opts.textFile) {
80
+ const text = readFileStrict(opts.textFile);
81
+ if (!entry.fields[field]) {
82
+ entry.fields[field] = {};
83
+ }
84
+ entry.fields[field][locale] = text;
85
+ if (!session.modifiedEntryIds.includes(entry.sys.id)) {
86
+ session.modifiedEntryIds.push(entry.sys.id);
87
+ }
88
+ saveSession(session);
89
+ successMsg(`Set ${field} on ${ref} from text file "${opts.textFile}".`);
90
+ return;
91
+ }
73
92
  if (!rawValue && !opts.links) {
74
- errorMsg('Missing value. Provide a <value> argument, or use --file <path> / --json <json> for Object fields.');
93
+ errorMsg('Missing value. Provide a <value> argument, or use --file <path> / --json <json> for Object fields, or --text-file <path> for plain text fields.');
75
94
  process.exit(1);
76
95
  }
77
96
  if (!isObjectMode && !opts.link && !opts.asset && !opts.links) {
@@ -1 +1 @@
1
- {"version":3,"file":"set.js","sourceRoot":"","sources":["../../src/commands/set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AI,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAW;IACnC,IAAI,GAAG,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,GAAG,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAClC,IAAI,GAAG,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,GAAG,CAAC;IACxD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -2,6 +2,6 @@
2
2
  * Content type IDs allowed when adding entries to page/article/template content arrays.
3
3
  * Used by the add command to refuse unsupported types with a clear error.
4
4
  */
5
- export declare const ALLOWED_CONTENT_TYPES_FOR_PAGE_ARTICLE: readonly ["component", "collection", "externalComponent", "person", "media", "externalVideo"];
5
+ export declare const ALLOWED_CONTENT_TYPES_FOR_PAGE_ARTICLE: readonly ["collection", "component", "externalComponent", "externalVideo", "htmlComponent", "media", "person"];
6
6
  export declare function isAllowedContentTypeForAdd(contentTypeId: string): boolean;
7
7
  //# sourceMappingURL=allowed-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"allowed-types.d.ts","sourceRoot":"","sources":["../../src/validation/allowed-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sCAAsC,+FAOzC,CAAC;AAEX,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAEzE"}
1
+ {"version":3,"file":"allowed-types.d.ts","sourceRoot":"","sources":["../../src/validation/allowed-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sCAAsC,gHAQzC,CAAC;AAEX,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAEzE"}
@@ -3,12 +3,13 @@
3
3
  * Used by the add command to refuse unsupported types with a clear error.
4
4
  */
5
5
  export const ALLOWED_CONTENT_TYPES_FOR_PAGE_ARTICLE = [
6
- 'component',
7
6
  'collection',
7
+ 'component',
8
8
  'externalComponent',
9
- 'person',
10
- 'media',
11
9
  'externalVideo',
10
+ 'htmlComponent',
11
+ 'media',
12
+ 'person',
12
13
  ];
13
14
  export function isAllowedContentTypeForAdd(contentTypeId) {
14
15
  return ALLOWED_CONTENT_TYPES_FOR_PAGE_ARTICLE.includes(contentTypeId);
@@ -1 +1 @@
1
- {"version":3,"file":"allowed-types.js","sourceRoot":"","sources":["../../src/validation/allowed-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,QAAQ;IACR,OAAO;IACP,eAAe;CACP,CAAC;AAEX,MAAM,UAAU,0BAA0B,CAAC,aAAqB;IAC9D,OAAQ,sCAA4D,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC/F,CAAC"}
1
+ {"version":3,"file":"allowed-types.js","sourceRoot":"","sources":["../../src/validation/allowed-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,YAAY;IACZ,WAAW;IACX,mBAAmB;IACnB,eAAe;IACf,eAAe;IACf,OAAO;IACP,QAAQ;CACA,CAAC;AAEX,MAAM,UAAU,0BAA0B,CAAC,aAAqB;IAC9D,OAAQ,sCAA4D,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC/F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "CLI tool for AI agents to read and edit Contentful draft content without publish permissions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,15 +29,15 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@contentful/rich-text-types": "^17.2.5",
32
- "@modelcontextprotocol/sdk": "1.28.0",
32
+ "@modelcontextprotocol/sdk": "^1.29.0",
33
33
  "commander": "^14.0.3",
34
- "contentful-management": "^12.0.0",
34
+ "contentful-management": "^12.2.0",
35
35
  "dotenv": "^17.3.1",
36
36
  "picocolors": "^1.1.1",
37
37
  "zod": "^4.3.6"
38
38
  },
39
39
  "devDependencies": {
40
- "@biomejs/biome": "^2.4.9",
40
+ "@biomejs/biome": "^2.4.10",
41
41
  "@types/node": "^22.19.15",
42
42
  "typescript": "^6.0.2",
43
43
  "vitest": "^4.1.2"
@@ -75,13 +75,31 @@ cms-merge-guidelines --app-dir apps/example-om1
75
75
 
76
76
  | CLI | Purpose |
77
77
  |---|---|
78
+ | `cms-generate-html-style-guide` | Generate `html-component-style-guide.md` from `tailwind.config.json` + `globals.css` |
78
79
  | `cms-generate-field-list` | Parse TypeScript types → `field-list.json` |
79
80
  | `cms-capture-screenshots` | Capture component screenshots for variant evaluation |
80
81
  | `cms-update-colour-hints` | Upsert a colour hint in `colour-hints.json` |
81
- | `cms-generate-collection-guidelines` | **New** — generate all collection/external `.md` files from a discovery URL |
82
+ | `cms-generate-collection-guidelines` | Generate all collection/external `.md` files from a discovery URL |
82
83
  | `cms-merge-guidelines` | Merge all fragments → `COMPONENT_GUIDELINES_FOR_LLM.md` |
83
84
 
84
- All CLIs are provided by `@se-studio/contentful-cms`. Run `pnpm build` from the repo root to ensure they are built and linked.
85
+ All CLIs are provided by `@se-studio/project-build`. Run `pnpm build` from the repo root to ensure they are built and linked.
86
+
87
+ ---
88
+
89
+ ## `cms-generate-html-style-guide`
90
+
91
+ Generates `docs/cms-guidelines/html-component-style-guide.md` — a design system reference for any LLM or developer authoring HTML in `HtmlComponent` CMS entries.
92
+
93
+ Does not require a running dev server. Reads only local files:
94
+ - `tailwind.config.json` → colour palette, typography classes, grid configuration
95
+ - `src/app/globals.css` → custom utilities, RTF class names, CSS custom properties
96
+
97
+ ```bash
98
+ # From the app directory:
99
+ pnpm cms-generate-html-style-guide
100
+ ```
101
+
102
+ The output file is a **static fragment** — not generated by the LLM component pipeline. It is automatically included as a preamble in `COMPONENT_GUIDELINES_FOR_LLM.md` when `cms-merge-guidelines` runs. Regenerate it whenever the design system changes.
85
103
 
86
104
  ---
87
105
 
@@ -128,10 +146,11 @@ Outputs:
128
146
  ```
129
147
  <appDir>/
130
148
  docs/cms-guidelines/
149
+ html-component-style-guide.md # design system reference (auto-generated; static fragment)
131
150
  components/ # one .md per componentType
132
151
  collections/ # one .md per collectionType
133
152
  externals/ # one .md per externalComponentType
134
- COMPONENT_GUIDELINES_FOR_LLM.md # merged document
153
+ COMPONENT_GUIDELINES_FOR_LLM.md # merged document (includes style guide as preamble)
135
154
  generated/cms-discovery/
136
155
  field-list.json
137
156
  colour-hints.json
@@ -0,0 +1,259 @@
1
+ ---
2
+ name: html-component-authoring
3
+ description: Guidelines for authoring HTML content in HtmlComponent CMS entries. Covers how to use the project style guide, what classes to use, field semantics, and common layout patterns.
4
+ license: Private
5
+ metadata:
6
+ author: se-core-product
7
+ version: "1.0.0"
8
+ ---
9
+
10
+ # HtmlComponent Authoring Guide
11
+
12
+ `HtmlComponent` is a CMS content type that renders developer-authored HTML directly into the page. It bypasses the standard component registration system and is intended for one-off or highly custom layouts that the structured component library cannot produce.
13
+
14
+ ---
15
+
16
+ ## Before You Start
17
+
18
+ **Read the project style guide.** Every app has an auto-generated HTML Component Style Guide at:
19
+
20
+ ```
21
+ docs/cms-guidelines/html-component-style-guide.md
22
+ ```
23
+
24
+ This file contains the exact colour names, typography class names, grid configuration, and custom utilities available for that specific project. It is derived from `tailwind.config.json` and `globals.css` — always consult it before writing any HTML.
25
+
26
+ If the file does not exist, generate it first:
27
+
28
+ ```bash
29
+ # From the app directory:
30
+ pnpm cms-generate-html-style-guide
31
+ ```
32
+
33
+ ---
34
+
35
+ ## HtmlComponent Fields
36
+
37
+ | Field | Required | Type | Purpose |
38
+ |-------|----------|------|---------|
39
+ | `rawHtml` | ✓ | Text | The HTML markup. Use Tailwind classes; never inline `style=` for colours/typography/layout. |
40
+ | `customCss` | — | Text | Scoped CSS. Rules are automatically prefixed with `[data-hc-id="<id>"]` — they cannot pollute other components. |
41
+ | `customJs` | — | Text | JavaScript loaded via Next.js `<Script>`. Use sparingly. |
42
+ | `markdownContent` | — | Text | Plain text for search indexing. **Always fill this** so the component appears in site search. |
43
+ | `isHero` | — | Boolean | `true` if the HTML contains an `<h1>`. Moves this block to the top of the page content flow. |
44
+ | `fullWidth` | — | Boolean | `true` for edge-to-edge (full-bleed) layouts that break out of the column grid. |
45
+ | `excludeFromSearch` | — | Boolean | `true` to exclude from search even if `markdownContent` is set. |
46
+ | `loadScriptOnce` | — | Boolean | `true` (default) to deduplicate the script tag when the same entry appears multiple times. |
47
+ | `scriptStrategy` | — | Enum | `afterInteractive` (default), `lazyOnload`, `beforeInteractive`. |
48
+
49
+ ---
50
+
51
+ ## The Four Non-Negotiable Rules
52
+
53
+ 1. **Use Tailwind classes, not inline styles.**
54
+ - ❌ `style="color: #FF5C00; font-size: 48px;"`
55
+ - ✓ `class="text-orange h2"`
56
+
57
+ 2. **Use named colour classes from the palette.**
58
+ - ❌ `class="bg-[#1F2E32]"` or `style="background: #1F2E32"`
59
+ - ✓ `class="bg-dark text-light"`
60
+
61
+ 3. **Use typography classes, not raw font sizes.**
62
+ - ❌ `class="text-[48px] font-semibold"`
63
+ - ✓ `class="h2"`
64
+
65
+ 4. **Respect the grid.** Wrap content in `content-cols-grid` and use `col-span-*` / `col-start-*` to align with other sections.
66
+
67
+ ---
68
+
69
+ ## Colour Usage
70
+
71
+ All colour names are defined in the style guide. Use lowercase in Tailwind:
72
+
73
+ ```
74
+ Dark → bg-dark / text-dark / border-dark
75
+ Light → bg-light / text-light / border-light
76
+ Orange → bg-orange / text-orange
77
+ Blue → bg-blue / text-blue
78
+ ```
79
+
80
+ For dark backgrounds, pair with the contrast colour (`bg-dark text-light`). Check the "Contrast pair" column in the style guide to know which pairings are approved.
81
+
82
+ ---
83
+
84
+ ## Typography Usage
85
+
86
+ Pick from the named type styles in the style guide. Apply directly to the element:
87
+
88
+ ```html
89
+ <h1 class="h1">Large display heading (uppercase, 96–200px)</h1>
90
+ <h2 class="h2">Section heading (45–48px)</h2>
91
+ <h3 class="h3">Sub-heading (21–44px, uppercase)</h3>
92
+ <p class="p1">Large body (20–24px)</p>
93
+ <p class="p2">Standard body (16px)</p>
94
+ <p class="p3">Small body (13px)</p>
95
+ ```
96
+
97
+ **For rich text blocks** (content rendered from Markdown or the CMS), wrap in an RTF class:
98
+
99
+ ```html
100
+ <div class="rtf-standard">
101
+ <h2>Auto-styled heading</h2>
102
+ <p>Auto-styled paragraph with list and link support.</p>
103
+ </div>
104
+ ```
105
+
106
+ Available RTF classes: `rtf-standard`, `rtf-article`, `rtf-article-right`, `rtf-legal`.
107
+
108
+ ---
109
+
110
+ ## Grid & Layout
111
+
112
+ HtmlComponent content lives inside the site's `Section` component, which provides the outer grid. To position content within the grid:
113
+
114
+ ```html
115
+ <!-- Standard: wrap in content-cols-grid, span columns -->
116
+ <div class="content-cols-grid">
117
+ <div class="col-span-full laptop:col-start-2 laptop:col-span-10">
118
+ <!-- content -->
119
+ </div>
120
+ </div>
121
+ ```
122
+
123
+ Common column spans (all on a 12-column laptop grid):
124
+
125
+ | Use | Classes |
126
+ |-----|---------|
127
+ | Full width | `col-span-full` |
128
+ | Centered (one column margin) | `laptop:col-start-2 laptop:col-span-10` |
129
+ | Left half (text) | `laptop:col-start-2 laptop:col-span-4` |
130
+ | Right half (visual) | `laptop:col-start-7 laptop:col-span-5` |
131
+
132
+ For **full-bleed** content (background extends edge to edge), set `fullWidth: true` on the entry. The grid wrapper is removed and you control the full viewport width.
133
+
134
+ ---
135
+
136
+ ## Breakpoints
137
+
138
+ All breakpoints are mobile-first. Use prefixes to override at larger sizes:
139
+
140
+ | Prefix | Min-width |
141
+ |--------|-----------|
142
+ | *(none)* | 0px (mobile default) |
143
+ | `tablet:` | 768px |
144
+ | `laptop:` | 1024px |
145
+ | `desktop:` | 1440px |
146
+
147
+ ```html
148
+ <div class="flex flex-col laptop:flex-row gap-6">...</div>
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Scoped CSS (`customCss`)
154
+
155
+ Use `customCss` only for styles impossible with Tailwind (complex `:hover`, `::before`/`::after`, third-party widget overrides).
156
+
157
+ Rules are automatically scoped to this entry's `data-hc-id` attribute — write selectors without the prefix:
158
+
159
+ ```css
160
+ /* In customCss — this gets scoped to [data-hc-id="<id>"] automatically */
161
+ .my-card:hover {
162
+ transform: translateY(-4px);
163
+ transition: transform 0.2s ease;
164
+ }
165
+
166
+ ::before {
167
+ content: '';
168
+ display: block;
169
+ }
170
+ ```
171
+
172
+ Never redeclare colours or typography in `customCss` — those already exist as Tailwind classes.
173
+
174
+ ---
175
+
176
+ ## Common Patterns
177
+
178
+ ### Centered text block
179
+
180
+ ```html
181
+ <div class="content-cols-grid">
182
+ <div class="col-span-full laptop:col-start-2 laptop:col-span-10 space-y-6">
183
+ <h2 class="h2">Section Heading</h2>
184
+ <div class="rtf-standard">
185
+ <p>Body copy goes here.</p>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ ```
190
+
191
+ ### Two-column (text + image)
192
+
193
+ ```html
194
+ <div class="content-cols-grid gap-y-12">
195
+ <div class="col-span-full laptop:col-start-2 laptop:col-span-4 flex flex-col gap-6">
196
+ <h2 class="h2">Heading</h2>
197
+ <p class="p1">Supporting description.</p>
198
+ </div>
199
+ <div class="col-span-full laptop:col-start-7 laptop:col-span-5">
200
+ <img src="..." alt="..." class="w-full rounded-lg" />
201
+ </div>
202
+ </div>
203
+ ```
204
+
205
+ ### Coloured card
206
+
207
+ ```html
208
+ <div class="content-cols-grid">
209
+ <div class="col-span-full laptop:col-start-2 laptop:col-span-10">
210
+ <div class="bg-orange text-dark p-8 laptop:p-12 rounded-lg flex flex-col gap-4">
211
+ <h3 class="h3">Card Title</h3>
212
+ <p class="p2">Supporting text.</p>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ ```
217
+
218
+ ### Hero (set `isHero: true`)
219
+
220
+ ```html
221
+ <!-- fullWidth: true → background goes edge-to-edge -->
222
+ <div class="bg-dark text-light">
223
+ <div class="content-cols-grid py-16 laptop:py-32">
224
+ <div class="col-span-full laptop:col-start-2 laptop:col-span-10 flex flex-col gap-8">
225
+ <h1 class="h1">Hero Heading</h1>
226
+ <p class="p1 laptop:col-span-6">Subtitle or intro text.</p>
227
+ </div>
228
+ </div>
229
+ </div>
230
+ ```
231
+
232
+ ---
233
+
234
+ ## Checklist Before Saving
235
+
236
+ - [ ] `rawHtml` uses only Tailwind classes — no inline `style=` for colours/typography/layout
237
+ - [ ] All colour references use named classes (`text-dark`, `bg-orange`), not hex values
238
+ - [ ] Typography uses named classes (`h2`, `p1`), not raw `text-[Npx]`
239
+ - [ ] Content is wrapped in `content-cols-grid` and positioned with `col-span-*` / `col-start-*`
240
+ - [ ] `markdownContent` is filled with the plain-text equivalent for search indexing
241
+ - [ ] `isHero: true` if the HTML contains an `<h1>`
242
+ - [ ] `fullWidth: true` if the design needs an edge-to-edge background
243
+ - [ ] Tested at mobile, tablet, and laptop breakpoints
244
+
245
+ ---
246
+
247
+ ## Generating and Updating the Style Guide
248
+
249
+ The style guide is auto-generated and should be regenerated whenever the design system changes:
250
+
251
+ ```bash
252
+ # From the app directory:
253
+ pnpm cms-generate-html-style-guide
254
+
255
+ # Then re-merge to include it in COMPONENT_GUIDELINES_FOR_LLM.md:
256
+ pnpm cms-guidelines:merge
257
+ ```
258
+
259
+ The style guide is also regenerated automatically as part of the `update-cms-guidelines` workflow (Step 3 in `fresh` mode, or any time you run a merge step).