multisite-cms-mcp 1.0.9 → 1.0.10
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/dist/tools/get-conversion-guide.d.ts.map +1 -1
- package/dist/tools/get-conversion-guide.js +22 -2
- package/dist/tools/get-example.d.ts +1 -1
- package/dist/tools/get-example.d.ts.map +1 -1
- package/dist/tools/get-example.js +50 -1
- package/dist/tools/get-schema.d.ts.map +1 -1
- package/dist/tools/get-schema.js +38 -0
- package/dist/tools/validate-manifest.d.ts.map +1 -1
- package/dist/tools/validate-manifest.js +4 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-conversion-guide.d.ts","sourceRoot":"","sources":["../../src/tools/get-conversion-guide.ts"],"names":[],"mappings":"AAAA,KAAK,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"get-conversion-guide.d.ts","sourceRoot":"","sources":["../../src/tools/get-conversion-guide.ts"],"names":[],"mappings":"AAAA,KAAK,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;AAopB1H;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAkD1E"}
|
|
@@ -151,6 +151,22 @@ repo/
|
|
|
151
151
|
}
|
|
152
152
|
\`\`\`
|
|
153
153
|
|
|
154
|
+
## Two Ways to Configure CMS Templates
|
|
155
|
+
|
|
156
|
+
### Option 1: In manifest.json (during package creation)
|
|
157
|
+
Configure \`cmsTemplates\` section as shown above when building the package.
|
|
158
|
+
|
|
159
|
+
### Option 2: Via Settings UI (after upload)
|
|
160
|
+
After uploading a package, go to **Dashboard → Settings → CMS Templates** to:
|
|
161
|
+
- Map any uploaded HTML page to a template type (Blog Index, Blog Post, Team, Downloads)
|
|
162
|
+
- Set custom URL paths for each CMS section
|
|
163
|
+
- The UI shows all pages from your manifest for easy selection
|
|
164
|
+
|
|
165
|
+
**Recommended workflow:**
|
|
166
|
+
1. Include template HTML files in your package (in pages/ or templates/)
|
|
167
|
+
2. Upload the package
|
|
168
|
+
3. Configure CMS template mappings in Settings if not already in manifest.json
|
|
169
|
+
|
|
154
170
|
## Page Configuration
|
|
155
171
|
|
|
156
172
|
Each page needs:
|
|
@@ -171,6 +187,10 @@ Each page needs:
|
|
|
171
187
|
|
|
172
188
|
**IMPORTANT:** Match paths to the original site's URLs!
|
|
173
189
|
|
|
190
|
+
## Editor Warnings
|
|
191
|
+
|
|
192
|
+
The editor automatically detects when you're viewing a CMS path (like /blog or /team) that doesn't have a template configured. A warning banner will appear prompting you to configure the template in Settings.
|
|
193
|
+
|
|
174
194
|
## Custom Collection Paths
|
|
175
195
|
|
|
176
196
|
For dynamic collections beyond the built-ins:
|
|
@@ -579,12 +599,12 @@ Keep external URLs unchanged:
|
|
|
579
599
|
- [ ] manifest.json at package root
|
|
580
600
|
- [ ] Static pages in pages/ folder
|
|
581
601
|
- [ ] Assets in public/ folder
|
|
582
|
-
- [ ] Templates in templates/
|
|
602
|
+
- [ ] Templates in templates/ (or pages/ if configuring via Settings UI)
|
|
583
603
|
|
|
584
604
|
## ✓ manifest.json
|
|
585
605
|
- [ ] All static pages listed in pages array
|
|
586
606
|
- [ ] Each page has path, file, title
|
|
587
|
-
- [ ] CMS templates configured
|
|
607
|
+
- [ ] CMS templates configured (OR plan to configure via Settings → CMS Templates after upload)
|
|
588
608
|
- [ ] Paths match original site URLs
|
|
589
609
|
|
|
590
610
|
## ✓ Assets
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ExampleType = 'manifest_basic' | 'manifest_custom_paths' | 'blog_index_template' | 'blog_post_template' | 'team_template' | 'downloads_template' | 'authors_template' | 'author_detail_template' | 'custom_collection_template' | 'form_handling' | 'asset_paths' | 'data_edit_keys' | 'each_loop' | 'conditional_if' | 'nested_fields' | 'featured_posts' | 'parent_context' | 'equality_comparison';
|
|
1
|
+
type ExampleType = 'manifest_basic' | 'manifest_custom_paths' | 'manifest_minimal_with_ui' | 'blog_index_template' | 'blog_post_template' | 'team_template' | 'downloads_template' | 'authors_template' | 'author_detail_template' | 'custom_collection_template' | 'form_handling' | 'asset_paths' | 'data_edit_keys' | 'each_loop' | 'conditional_if' | 'nested_fields' | 'featured_posts' | 'parent_context' | 'equality_comparison';
|
|
2
2
|
/**
|
|
3
3
|
* Returns example code for a specific pattern
|
|
4
4
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-example.d.ts","sourceRoot":"","sources":["../../src/tools/get-example.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GACZ,gBAAgB,GAChB,uBAAuB,GACvB,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,GACf,oBAAoB,GACpB,kBAAkB,GAClB,wBAAwB,GACxB,4BAA4B,GAC5B,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-example.d.ts","sourceRoot":"","sources":["../../src/tools/get-example.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GACZ,gBAAgB,GAChB,uBAAuB,GACvB,0BAA0B,GAC1B,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,GACf,oBAAoB,GACpB,kBAAkB,GAClB,wBAAwB,GACxB,4BAA4B,GAC5B,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,qBAAqB,CAAC;AAu0B1B;;GAEG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAE1E"}
|
|
@@ -68,7 +68,7 @@ When your site uses different URLs than the defaults:
|
|
|
68
68
|
"downloadsPath": "/resources",
|
|
69
69
|
"authorsIndex": "templates/contributors.html",
|
|
70
70
|
"authorDetail": "templates/contributor.html",
|
|
71
|
-
"
|
|
71
|
+
"authorsPath": "/contributors"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
\`\`\`
|
|
@@ -78,6 +78,55 @@ When your site uses different URLs than the defaults:
|
|
|
78
78
|
- \`blogPostPath: "/insights"\` → Posts at /insights/post-slug
|
|
79
79
|
- \`teamPath: "/about/leadership"\` → Team page at /about/leadership
|
|
80
80
|
- Both blogIndexPath and blogPostPath should usually match`,
|
|
81
|
+
manifest_minimal_with_ui: `# Minimal manifest.json (Configure Templates via Settings UI)
|
|
82
|
+
|
|
83
|
+
When you want to upload pages first and configure CMS templates later via the Settings UI:
|
|
84
|
+
|
|
85
|
+
\`\`\`json
|
|
86
|
+
{
|
|
87
|
+
"pages": [
|
|
88
|
+
{
|
|
89
|
+
"path": "/",
|
|
90
|
+
"file": "pages/index.html",
|
|
91
|
+
"title": "Home",
|
|
92
|
+
"editable": true
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"path": "/about",
|
|
96
|
+
"file": "pages/about.html",
|
|
97
|
+
"title": "About Us",
|
|
98
|
+
"editable": true
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"path": "/blog",
|
|
102
|
+
"file": "pages/blog.html",
|
|
103
|
+
"title": "Blog",
|
|
104
|
+
"editable": true
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"path": "/blog-post",
|
|
108
|
+
"file": "pages/blog-post.html",
|
|
109
|
+
"title": "Blog Post Template",
|
|
110
|
+
"editable": true
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
\`\`\`
|
|
115
|
+
|
|
116
|
+
**After uploading this package:**
|
|
117
|
+
1. Go to Dashboard → Settings → CMS Templates
|
|
118
|
+
2. Select "Blog" (/blog) as the Blog Index Template
|
|
119
|
+
3. Select "Blog Post Template" (/blog-post) as the Blog Post Template
|
|
120
|
+
4. Set the Blog URL Path (e.g., /blog)
|
|
121
|
+
5. Click Save
|
|
122
|
+
|
|
123
|
+
**Benefits of this approach:**
|
|
124
|
+
- Faster initial upload - no need to configure cmsTemplates in JSON
|
|
125
|
+
- Visual UI makes it easier to understand the configuration
|
|
126
|
+
- Can change template mappings without re-uploading the package
|
|
127
|
+
- Good for iterating on template designs
|
|
128
|
+
|
|
129
|
+
**Note:** The editor will show a warning banner if you visit /blog before configuring the template.`,
|
|
81
130
|
blog_index_template: `# Blog Index Template
|
|
82
131
|
|
|
83
132
|
Lists all blog posts with filtering options:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-schema.d.ts","sourceRoot":"","sources":["../../src/tools/get-schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"get-schema.d.ts","sourceRoot":"","sources":["../../src/tools/get-schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAyQjD"}
|
package/dist/tools/get-schema.js
CHANGED
|
@@ -181,6 +181,44 @@ For HTML content that should NOT be escaped:
|
|
|
181
181
|
|
|
182
182
|
---
|
|
183
183
|
|
|
184
|
+
## CMS Template Configuration
|
|
185
|
+
|
|
186
|
+
Templates can be configured two ways:
|
|
187
|
+
|
|
188
|
+
### 1. In manifest.json
|
|
189
|
+
\`\`\`json
|
|
190
|
+
{
|
|
191
|
+
"cmsTemplates": {
|
|
192
|
+
"blogIndex": "templates/blog_index.html",
|
|
193
|
+
"blogIndexPath": "/blog",
|
|
194
|
+
"blogPost": "templates/blog_post.html",
|
|
195
|
+
"blogPostPath": "/blog",
|
|
196
|
+
"team": "templates/team.html",
|
|
197
|
+
"teamPath": "/team",
|
|
198
|
+
"downloads": "templates/downloads.html",
|
|
199
|
+
"downloadsPath": "/resources"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
\`\`\`
|
|
203
|
+
|
|
204
|
+
### 2. Via Settings UI (after upload)
|
|
205
|
+
Go to **Dashboard → Settings → CMS Templates** to:
|
|
206
|
+
- Select which uploaded page serves as each template type
|
|
207
|
+
- Configure custom URL paths for each CMS section
|
|
208
|
+
- Changes take effect immediately
|
|
209
|
+
|
|
210
|
+
**Template Types:**
|
|
211
|
+
- **Blog Index** - Lists all blog posts (e.g., /blog)
|
|
212
|
+
- **Blog Post** - Single blog post detail page (e.g., /blog/my-post)
|
|
213
|
+
- **Team** - Team members page (e.g., /team)
|
|
214
|
+
- **Downloads** - Downloadable files listing (e.g., /resources)
|
|
215
|
+
- **Authors Index** - Lists all authors
|
|
216
|
+
- **Author Detail** - Single author profile page
|
|
217
|
+
|
|
218
|
+
**Note:** The editor shows a warning banner when viewing CMS paths (like /blog) that don't have templates configured.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
184
222
|
## Form Handling
|
|
185
223
|
|
|
186
224
|
Forms are automatically captured and stored in the CMS.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-manifest.d.ts","sourceRoot":"","sources":["../../src/tools/validate-manifest.ts"],"names":[],"mappings":"AA8BA;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"validate-manifest.d.ts","sourceRoot":"","sources":["../../src/tools/validate-manifest.ts"],"names":[],"mappings":"AA8BA;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsI5E"}
|
|
@@ -130,7 +130,7 @@ The manifest.json structure is correct.
|
|
|
130
130
|
|
|
131
131
|
Summary:
|
|
132
132
|
- ${m.pages?.length || 0} static page(s) defined
|
|
133
|
-
- CMS templates: ${templates ? 'configured' : 'not configured'}
|
|
133
|
+
- CMS templates: ${templates ? 'configured in manifest' : 'not configured (can be set via Settings → CMS Templates after upload)'}
|
|
134
134
|
- Head HTML: ${m.defaultHeadHtml ? 'configured' : 'not configured'}`;
|
|
135
135
|
}
|
|
136
136
|
else if (errors.length === 0) {
|
|
@@ -139,7 +139,9 @@ Summary:
|
|
|
139
139
|
The manifest structure is valid but has potential issues:
|
|
140
140
|
|
|
141
141
|
Warnings:
|
|
142
|
-
${warnings.join('\n')}
|
|
142
|
+
${warnings.join('\n')}
|
|
143
|
+
|
|
144
|
+
💡 Tip: CMS templates can also be configured after upload via Dashboard → Settings → CMS Templates`;
|
|
143
145
|
}
|
|
144
146
|
else {
|
|
145
147
|
output = `❌ MANIFEST INVALID
|
package/package.json
CHANGED