@wkgeo/cli 2.0.3 → 2.1.0

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.
@@ -1,480 +1,480 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://wkgeo.com/schema/wkgeo-site-manifest@1.json",
4
- "title": "wkgeo-site-manifest@1",
5
- "description": "A(agent)→ 平台的建站内容契约:A 交这份 manifest,`wkgeo content apply --file <它>` 负责校验、幂等落库、按需发布。未覆盖的跨引用与文件存在性由 CLI 内置校验负责。",
6
- "type": "object",
7
- "required": [
8
- "_format",
9
- "site",
10
- "unfilled"
11
- ],
12
- "additionalProperties": true,
13
- "properties": {
14
- "_format": {
15
- "const": "wkgeo-site-manifest@1"
16
- },
17
- "_source": {
18
- "type": "object",
19
- "description": "来源说明(给老板看的溯源信息;不进库)",
20
- "additionalProperties": true
21
- },
22
- "_note": {
23
- "type": "string",
24
- "description": "给老板/接手下一位的一句话(不进库)"
25
- },
26
- "site": {
27
- "type": "object",
28
- "required": [
29
- "name",
30
- "lang"
31
- ],
32
- "additionalProperties": false,
33
- "properties": {
34
- "name": {
35
- "type": "string",
36
- "maxLength": 100,
37
- "description": "必须与 --site 指到的站点同名(否则报错,防错站)"
38
- },
39
- "lang": {
40
- "type": "string",
41
- "pattern": "^[a-z]{2}(-[a-zA-Z]{2,4})?$"
42
- },
43
- "templateKey": {
44
- "type": "string",
45
- "description": "期望的模板 key(只校验/提示,apply 不自动装模板)"
46
- }
47
- }
48
- },
49
- "menus": {
50
- "type": "array",
51
- "maxItems": 50,
52
- "items": {
53
- "$ref": "#/definitions/menu"
54
- }
55
- },
56
- "categories": {
57
- "type": "array",
58
- "maxItems": 200,
59
- "items": {
60
- "$ref": "#/definitions/category"
61
- },
62
- "description": "slug 必须唯一;parent 必须能在本数组或站点已有栏目里解析到"
63
- },
64
- "contents": {
65
- "type": "array",
66
- "maxItems": 500,
67
- "items": {
68
- "$ref": "#/definitions/content"
69
- }
70
- },
71
- "assets": {
72
- "type": "array",
73
- "maxItems": 100,
74
- "items": {
75
- "$ref": "#/definitions/asset"
76
- }
77
- },
78
- "singles": {
79
- "type": "array",
80
- "maxItems": 50,
81
- "items": {
82
- "$ref": "#/definitions/single"
83
- }
84
- },
85
- "unfilled": {
86
- "type": "array",
87
- "maxItems": 200,
88
- "items": {
89
- "$ref": "#/definitions/unfilled"
90
- },
91
- "description": "必填:没填的项 + 原因;全填齐写 []"
92
- }
93
- },
94
- "definitions": {
95
- "field": {
96
- "type": "object",
97
- "required": [
98
- "key"
99
- ],
100
- "additionalProperties": false,
101
- "properties": {
102
- "key": {
103
- "type": "string",
104
- "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
105
- "description": "字段 key(与后台自定义字段一致)"
106
- },
107
- "label": {
108
- "type": "string",
109
- "maxLength": 100,
110
- "description": "默认取 key"
111
- },
112
- "type": {
113
- "enum": [
114
- "input",
115
- "textarea",
116
- "number",
117
- "date",
118
- "select",
119
- "switch",
120
- "image",
121
- "images",
122
- "imageGroup",
123
- "file",
124
- "richtext",
125
- "video"
126
- ],
127
- "description": "默认 input"
128
- },
129
- "required": {
130
- "type": "boolean",
131
- "description": "默认 false"
132
- },
133
- "options": {
134
- "description": "select 的选项:{\"值\":\"显示名\"} 或 [\"值\"]"
135
- },
136
- "sort": {
137
- "type": "number",
138
- "description": "默认按声明顺序 ×10"
139
- },
140
- "formGroup": {
141
- "type": "string",
142
- "description": "后台表单分组(可选)"
143
- }
144
- }
145
- },
146
- "category": {
147
- "type": "object",
148
- "required": [
149
- "slug",
150
- "name"
151
- ],
152
- "additionalProperties": false,
153
- "properties": {
154
- "slug": {
155
- "type": "string",
156
- "pattern": "^[a-z0-9][a-z0-9_-]{0,59}$",
157
- "description": "栏目唯一标识;apply 按它幂等"
158
- },
159
- "name": {
160
- "type": "string",
161
- "maxLength": 100
162
- },
163
- "path": {
164
- "type": "string",
165
- "pattern": "^/[a-z0-9][a-z0-9_/-]*/$",
166
- "description": "可选;给了就必须与 slug/层级算出来的一致"
167
- },
168
- "type": {
169
- "enum": [
170
- "list",
171
- "single",
172
- "channel"
173
- ],
174
- "description": "list=列表页(默认)| single=单页 | channel=频道页(首页/总览;子栏目继承父)"
175
- },
176
- "parent": {
177
- "type": "string",
178
- "description": "父栏目 slug 或 path;子栏目继承父的类型"
179
- },
180
- "sort": {
181
- "type": "number",
182
- "description": "同级排序,默认按声明顺序 ×10"
183
- },
184
- "inMenu": {
185
- "type": "boolean",
186
- "description": "是否显示在前台导航(也认 in_menu)。不写 = 按 menus[] 反推:清单声明了导航但没引用它 ⇒ 隐藏(in_menu=false);首页独立板块(首页·XXX)就该这样隐藏"
187
- },
188
- "templateFile": {
189
- "type": "string",
190
- "pattern": "\\.html$",
191
- "description": "本站已有的模板文件(如 list.html),必须是 .html"
192
- },
193
- "description": {
194
- "type": "string",
195
- "description": "栏目简介,落 description"
196
- },
197
- "seoDescription": {
198
- "type": "string",
199
- "maxLength": 500,
200
- "description": "回退读 seo.description"
201
- },
202
- "seoKeywords": {
203
- "type": "string",
204
- "maxLength": 300,
205
- "description": "回退读 seo.keywords"
206
- },
207
- "fields": {
208
- "type": "array",
209
- "maxItems": 30,
210
- "items": {
211
- "$ref": "#/definitions/field"
212
- }
213
- }
214
- }
215
- },
216
- "asset": {
217
- "type": "object",
218
- "required": [
219
- "path"
220
- ],
221
- "additionalProperties": false,
222
- "properties": {
223
- "key": {
224
- "type": "string",
225
- "description": "给 contents[].attachments / cover 引用;默认取文件名"
226
- },
227
- "path": {
228
- "type": "string",
229
- "description": "相对 manifest 的本地路径(≤200MB)"
230
- },
231
- "use": {
232
- "enum": [
233
- "logo",
234
- "banner",
235
- "cover",
236
- "content",
237
- "download"
238
- ],
239
- "description": "默认 content;logo 会同时写进站点信息"
240
- },
241
- "role": {
242
- "enum": [
243
- "image",
244
- "css",
245
- "js",
246
- "file"
247
- ],
248
- "description": "素材角色:缺省按扩展名推断(.css→css、.js→js、图片→image、其余→file);去重键是 (sha256, role)"
249
- },
250
- "alt": {
251
- "type": "string",
252
- "maxLength": 200,
253
- "description": "alt / 素材显示名;apply 按它认领已有素材(重名会报错)"
254
- },
255
- "name": {
256
- "type": "string",
257
- "maxLength": 100,
258
- "description": "alt 缺省时的显示名"
259
- }
260
- }
261
- },
262
- "content": {
263
- "type": "object",
264
- "required": [
265
- "categorySlug",
266
- "title"
267
- ],
268
- "additionalProperties": false,
269
- "properties": {
270
- "categorySlug": {
271
- "type": "string",
272
- "description": "挂到哪个栏目(slug)"
273
- },
274
- "title": {
275
- "type": "string",
276
- "maxLength": 200,
277
- "description": "必填;空=这一条失败(其余照常)"
278
- },
279
- "slug": {
280
- "type": "string",
281
- "maxLength": 60,
282
- "description": "内容 slug;缺省用 title 认领"
283
- },
284
- "status": {
285
- "enum": [
286
- "draft",
287
- "published",
288
- "hidden"
289
- ],
290
- "description": "默认 published(A 交的是成品)"
291
- },
292
- "seo": {
293
- "type": "object",
294
- "additionalProperties": false,
295
- "properties": {
296
- "title": {
297
- "type": "string",
298
- "maxLength": 200,
299
- "description": "仅提示:平台无 seo_title 字段"
300
- },
301
- "description": {
302
- "type": "string",
303
- "maxLength": 500
304
- },
305
- "keywords": {
306
- "type": "string",
307
- "maxLength": 300
308
- }
309
- }
310
- },
311
- "bodyFile": {
312
- "type": "string",
313
- "description": "正文 HTML 文件(相对 manifest,≤512KB);与 body 二选一"
314
- },
315
- "body": {
316
- "type": "string",
317
- "description": "正文 HTML 字符串;与 bodyFile 二选一"
318
- },
319
- "attachments": {
320
- "type": "array",
321
- "items": {
322
- "type": "string"
323
- },
324
- "description": "素材 key 或站点素材 uuid"
325
- },
326
- "cover": {
327
- "type": "string",
328
- "description": "封面素材 key 或 uuid"
329
- },
330
- "customFields": {
331
- "type": "object",
332
- "description": "栏目自定义字段的值(键必须是该栏目 fields[] 里的 key)"
333
- },
334
- "sort": {
335
- "type": "number"
336
- },
337
- "pinned": {
338
- "type": "boolean"
339
- }
340
- }
341
- },
342
- "single": {
343
- "type": "object",
344
- "required": [
345
- "categorySlug"
346
- ],
347
- "additionalProperties": true,
348
- "properties": {
349
- "categorySlug": {
350
- "type": "string",
351
- "description": "挂到哪个栏目(slug)"
352
- },
353
- "title": {
354
- "type": "string",
355
- "maxLength": 200,
356
- "description": "必填;空=这一条失败(其余照常)"
357
- },
358
- "slug": {
359
- "type": "string",
360
- "maxLength": 60,
361
- "description": "内容 slug;缺省用 title 认领"
362
- },
363
- "status": {
364
- "enum": [
365
- "draft",
366
- "published",
367
- "hidden"
368
- ],
369
- "description": "默认 published(A 交的是成品)"
370
- },
371
- "seo": {
372
- "type": "object",
373
- "additionalProperties": false,
374
- "properties": {
375
- "title": {
376
- "type": "string",
377
- "maxLength": 200,
378
- "description": "仅提示:平台无 seo_title 字段"
379
- },
380
- "description": {
381
- "type": "string",
382
- "maxLength": 500
383
- },
384
- "keywords": {
385
- "type": "string",
386
- "maxLength": 300
387
- }
388
- }
389
- },
390
- "bodyFile": {
391
- "type": "string",
392
- "description": "正文 HTML 文件(相对 manifest,≤512KB);与 body 二选一"
393
- },
394
- "body": {
395
- "type": "string",
396
- "description": "正文 HTML 字符串;与 bodyFile 二选一"
397
- },
398
- "attachments": {
399
- "type": "array",
400
- "items": {
401
- "type": "string"
402
- },
403
- "description": "素材 key 或站点素材 uuid"
404
- },
405
- "cover": {
406
- "type": "string",
407
- "description": "封面素材 key 或 uuid"
408
- },
409
- "customFields": {
410
- "type": "object",
411
- "description": "栏目自定义字段的值(键必须是该栏目 fields[] 里的 key)"
412
- },
413
- "sort": {
414
- "type": "number"
415
- },
416
- "pinned": {
417
- "type": "boolean"
418
- }
419
- },
420
- "description": "单页内容:绑一个 type=single 的栏目;title 缺省取栏目名"
421
- },
422
- "menu": {
423
- "type": "object",
424
- "required": [
425
- "label",
426
- "path"
427
- ],
428
- "additionalProperties": false,
429
- "properties": {
430
- "label": {
431
- "type": "string",
432
- "maxLength": 100
433
- },
434
- "path": {
435
- "type": "string",
436
- "pattern": "^/[a-z0-9][a-z0-9_/-]*/$",
437
- "description": "必须等于某个栏目的 path"
438
- },
439
- "sort": {
440
- "type": "number"
441
- },
442
- "children": {
443
- "type": "array",
444
- "maxItems": 50,
445
- "items": {
446
- "$ref": "#/definitions/menu"
447
- },
448
- "description": "最多 3 级"
449
- }
450
- }
451
- },
452
- "unfilled": {
453
- "type": "object",
454
- "required": [
455
- "item",
456
- "reason"
457
- ],
458
- "additionalProperties": false,
459
- "properties": {
460
- "item": {
461
- "type": "string",
462
- "description": "哪个位置没填,如 categories[2].seoDescription"
463
- },
464
- "reason": {
465
- "enum": [
466
- "来源缺失",
467
- "需老板确认",
468
- "版权不明",
469
- "平台不支持"
470
- ],
471
- "description": "为什么没填"
472
- },
473
- "detail": {
474
- "type": "string",
475
- "description": "补充说明(谁去补 / 卡在哪)"
476
- }
477
- }
478
- }
479
- }
480
- }
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://wkgeo.com/schema/wkgeo-site-manifest@1.json",
4
+ "title": "wkgeo-site-manifest@1",
5
+ "description": "A(agent)→ 平台的建站内容契约:A 交这份 manifest,`wkgeo content apply --file <它>` 负责校验、幂等落库、按需发布。未覆盖的跨引用与文件存在性由 CLI 内置校验负责。",
6
+ "type": "object",
7
+ "required": [
8
+ "_format",
9
+ "site",
10
+ "unfilled"
11
+ ],
12
+ "additionalProperties": true,
13
+ "properties": {
14
+ "_format": {
15
+ "const": "wkgeo-site-manifest@1"
16
+ },
17
+ "_source": {
18
+ "type": "object",
19
+ "description": "来源说明(给老板看的溯源信息;不进库)",
20
+ "additionalProperties": true
21
+ },
22
+ "_note": {
23
+ "type": "string",
24
+ "description": "给老板/接手下一位的一句话(不进库)"
25
+ },
26
+ "site": {
27
+ "type": "object",
28
+ "required": [
29
+ "name",
30
+ "lang"
31
+ ],
32
+ "additionalProperties": false,
33
+ "properties": {
34
+ "name": {
35
+ "type": "string",
36
+ "maxLength": 100,
37
+ "description": "必须与 --site 指到的站点同名(否则报错,防错站)"
38
+ },
39
+ "lang": {
40
+ "type": "string",
41
+ "pattern": "^[a-z]{2}(-[a-zA-Z]{2,4})?$"
42
+ },
43
+ "templateKey": {
44
+ "type": "string",
45
+ "description": "期望的模板 key(只校验/提示,apply 不自动装模板)"
46
+ }
47
+ }
48
+ },
49
+ "menus": {
50
+ "type": "array",
51
+ "maxItems": 50,
52
+ "items": {
53
+ "$ref": "#/definitions/menu"
54
+ }
55
+ },
56
+ "categories": {
57
+ "type": "array",
58
+ "maxItems": 200,
59
+ "items": {
60
+ "$ref": "#/definitions/category"
61
+ },
62
+ "description": "slug 必须唯一;parent 必须能在本数组或站点已有栏目里解析到"
63
+ },
64
+ "contents": {
65
+ "type": "array",
66
+ "maxItems": 500,
67
+ "items": {
68
+ "$ref": "#/definitions/content"
69
+ }
70
+ },
71
+ "assets": {
72
+ "type": "array",
73
+ "maxItems": 100,
74
+ "items": {
75
+ "$ref": "#/definitions/asset"
76
+ }
77
+ },
78
+ "singles": {
79
+ "type": "array",
80
+ "maxItems": 50,
81
+ "items": {
82
+ "$ref": "#/definitions/single"
83
+ }
84
+ },
85
+ "unfilled": {
86
+ "type": "array",
87
+ "maxItems": 200,
88
+ "items": {
89
+ "$ref": "#/definitions/unfilled"
90
+ },
91
+ "description": "必填:没填的项 + 原因;全填齐写 []"
92
+ }
93
+ },
94
+ "definitions": {
95
+ "field": {
96
+ "type": "object",
97
+ "required": [
98
+ "key"
99
+ ],
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "key": {
103
+ "type": "string",
104
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
105
+ "description": "字段 key(与后台自定义字段一致)"
106
+ },
107
+ "label": {
108
+ "type": "string",
109
+ "maxLength": 100,
110
+ "description": "默认取 key"
111
+ },
112
+ "type": {
113
+ "enum": [
114
+ "input",
115
+ "textarea",
116
+ "number",
117
+ "date",
118
+ "select",
119
+ "switch",
120
+ "image",
121
+ "images",
122
+ "imageGroup",
123
+ "file",
124
+ "richtext",
125
+ "video"
126
+ ],
127
+ "description": "默认 input"
128
+ },
129
+ "required": {
130
+ "type": "boolean",
131
+ "description": "默认 false"
132
+ },
133
+ "options": {
134
+ "description": "select 的选项:{\"值\":\"显示名\"} 或 [\"值\"]"
135
+ },
136
+ "sort": {
137
+ "type": "number",
138
+ "description": "默认按声明顺序 ×10"
139
+ },
140
+ "formGroup": {
141
+ "type": "string",
142
+ "description": "后台表单分组(可选)"
143
+ }
144
+ }
145
+ },
146
+ "category": {
147
+ "type": "object",
148
+ "required": [
149
+ "slug",
150
+ "name"
151
+ ],
152
+ "additionalProperties": false,
153
+ "properties": {
154
+ "slug": {
155
+ "type": "string",
156
+ "pattern": "^[a-z0-9][a-z0-9_-]{0,59}$",
157
+ "description": "栏目唯一标识;apply 按它幂等"
158
+ },
159
+ "name": {
160
+ "type": "string",
161
+ "maxLength": 100
162
+ },
163
+ "path": {
164
+ "type": "string",
165
+ "pattern": "^/[a-z0-9][a-z0-9_/-]*/$",
166
+ "description": "可选;给了就必须与 slug/层级算出来的一致"
167
+ },
168
+ "type": {
169
+ "enum": [
170
+ "list",
171
+ "single",
172
+ "channel"
173
+ ],
174
+ "description": "list=列表页(默认)| single=单页 | channel=频道页(首页/总览;子栏目继承父)"
175
+ },
176
+ "parent": {
177
+ "type": "string",
178
+ "description": "父栏目 slug 或 path;子栏目继承父的类型"
179
+ },
180
+ "sort": {
181
+ "type": "number",
182
+ "description": "同级排序,默认按声明顺序 ×10"
183
+ },
184
+ "inMenu": {
185
+ "type": "boolean",
186
+ "description": "是否显示在前台导航(也认 in_menu)。不写 = 按 menus[] 反推:清单声明了导航但没引用它 ⇒ 隐藏(in_menu=false);首页独立板块(首页·XXX)就该这样隐藏"
187
+ },
188
+ "templateFile": {
189
+ "type": "string",
190
+ "pattern": "\\.html$",
191
+ "description": "本站已有的模板文件(如 list.html),必须是 .html"
192
+ },
193
+ "description": {
194
+ "type": "string",
195
+ "description": "栏目简介,落 description"
196
+ },
197
+ "seoDescription": {
198
+ "type": "string",
199
+ "maxLength": 500,
200
+ "description": "回退读 seo.description"
201
+ },
202
+ "seoKeywords": {
203
+ "type": "string",
204
+ "maxLength": 300,
205
+ "description": "回退读 seo.keywords"
206
+ },
207
+ "fields": {
208
+ "type": "array",
209
+ "maxItems": 30,
210
+ "items": {
211
+ "$ref": "#/definitions/field"
212
+ }
213
+ }
214
+ }
215
+ },
216
+ "asset": {
217
+ "type": "object",
218
+ "required": [
219
+ "path"
220
+ ],
221
+ "additionalProperties": false,
222
+ "properties": {
223
+ "key": {
224
+ "type": "string",
225
+ "description": "给 contents[].attachments / cover 引用;默认取文件名"
226
+ },
227
+ "path": {
228
+ "type": "string",
229
+ "description": "相对 manifest 的本地路径(≤200MB)"
230
+ },
231
+ "use": {
232
+ "enum": [
233
+ "logo",
234
+ "banner",
235
+ "cover",
236
+ "content",
237
+ "download"
238
+ ],
239
+ "description": "默认 content;logo 会同时写进站点信息"
240
+ },
241
+ "role": {
242
+ "enum": [
243
+ "image",
244
+ "css",
245
+ "js",
246
+ "file"
247
+ ],
248
+ "description": "素材角色:缺省按扩展名推断(.css→css、.js→js、图片→image、其余→file);去重键是 (sha256, role)"
249
+ },
250
+ "alt": {
251
+ "type": "string",
252
+ "maxLength": 200,
253
+ "description": "alt / 素材显示名;apply 按它认领已有素材(重名会报错)"
254
+ },
255
+ "name": {
256
+ "type": "string",
257
+ "maxLength": 100,
258
+ "description": "alt 缺省时的显示名"
259
+ }
260
+ }
261
+ },
262
+ "content": {
263
+ "type": "object",
264
+ "required": [
265
+ "categorySlug",
266
+ "title"
267
+ ],
268
+ "additionalProperties": false,
269
+ "properties": {
270
+ "categorySlug": {
271
+ "type": "string",
272
+ "description": "挂到哪个栏目(slug)"
273
+ },
274
+ "title": {
275
+ "type": "string",
276
+ "maxLength": 200,
277
+ "description": "必填;空=这一条失败(其余照常)"
278
+ },
279
+ "slug": {
280
+ "type": "string",
281
+ "maxLength": 60,
282
+ "description": "内容 slug;缺省用 title 认领"
283
+ },
284
+ "status": {
285
+ "enum": [
286
+ "draft",
287
+ "published",
288
+ "hidden"
289
+ ],
290
+ "description": "默认 published(A 交的是成品)"
291
+ },
292
+ "seo": {
293
+ "type": "object",
294
+ "additionalProperties": false,
295
+ "properties": {
296
+ "title": {
297
+ "type": "string",
298
+ "maxLength": 200,
299
+ "description": "仅提示:平台无 seo_title 字段"
300
+ },
301
+ "description": {
302
+ "type": "string",
303
+ "maxLength": 500
304
+ },
305
+ "keywords": {
306
+ "type": "string",
307
+ "maxLength": 300
308
+ }
309
+ }
310
+ },
311
+ "bodyFile": {
312
+ "type": "string",
313
+ "description": "正文 HTML 文件(相对 manifest,≤512KB);与 body 二选一"
314
+ },
315
+ "body": {
316
+ "type": "string",
317
+ "description": "正文 HTML 字符串;与 bodyFile 二选一"
318
+ },
319
+ "attachments": {
320
+ "type": "array",
321
+ "items": {
322
+ "type": "string"
323
+ },
324
+ "description": "素材 key 或站点素材 uuid"
325
+ },
326
+ "cover": {
327
+ "type": "string",
328
+ "description": "封面素材 key 或 uuid"
329
+ },
330
+ "customFields": {
331
+ "type": "object",
332
+ "description": "栏目自定义字段的值(键必须是该栏目 fields[] 里的 key)"
333
+ },
334
+ "sort": {
335
+ "type": "number"
336
+ },
337
+ "pinned": {
338
+ "type": "boolean"
339
+ }
340
+ }
341
+ },
342
+ "single": {
343
+ "type": "object",
344
+ "required": [
345
+ "categorySlug"
346
+ ],
347
+ "additionalProperties": true,
348
+ "properties": {
349
+ "categorySlug": {
350
+ "type": "string",
351
+ "description": "挂到哪个栏目(slug)"
352
+ },
353
+ "title": {
354
+ "type": "string",
355
+ "maxLength": 200,
356
+ "description": "必填;空=这一条失败(其余照常)"
357
+ },
358
+ "slug": {
359
+ "type": "string",
360
+ "maxLength": 60,
361
+ "description": "内容 slug;缺省用 title 认领"
362
+ },
363
+ "status": {
364
+ "enum": [
365
+ "draft",
366
+ "published",
367
+ "hidden"
368
+ ],
369
+ "description": "默认 published(A 交的是成品)"
370
+ },
371
+ "seo": {
372
+ "type": "object",
373
+ "additionalProperties": false,
374
+ "properties": {
375
+ "title": {
376
+ "type": "string",
377
+ "maxLength": 200,
378
+ "description": "仅提示:平台无 seo_title 字段"
379
+ },
380
+ "description": {
381
+ "type": "string",
382
+ "maxLength": 500
383
+ },
384
+ "keywords": {
385
+ "type": "string",
386
+ "maxLength": 300
387
+ }
388
+ }
389
+ },
390
+ "bodyFile": {
391
+ "type": "string",
392
+ "description": "正文 HTML 文件(相对 manifest,≤512KB);与 body 二选一"
393
+ },
394
+ "body": {
395
+ "type": "string",
396
+ "description": "正文 HTML 字符串;与 bodyFile 二选一"
397
+ },
398
+ "attachments": {
399
+ "type": "array",
400
+ "items": {
401
+ "type": "string"
402
+ },
403
+ "description": "素材 key 或站点素材 uuid"
404
+ },
405
+ "cover": {
406
+ "type": "string",
407
+ "description": "封面素材 key 或 uuid"
408
+ },
409
+ "customFields": {
410
+ "type": "object",
411
+ "description": "栏目自定义字段的值(键必须是该栏目 fields[] 里的 key)"
412
+ },
413
+ "sort": {
414
+ "type": "number"
415
+ },
416
+ "pinned": {
417
+ "type": "boolean"
418
+ }
419
+ },
420
+ "description": "单页内容:绑一个 type=single 的栏目;title 缺省取栏目名"
421
+ },
422
+ "menu": {
423
+ "type": "object",
424
+ "required": [
425
+ "label",
426
+ "path"
427
+ ],
428
+ "additionalProperties": false,
429
+ "properties": {
430
+ "label": {
431
+ "type": "string",
432
+ "maxLength": 100
433
+ },
434
+ "path": {
435
+ "type": "string",
436
+ "pattern": "^/[a-z0-9][a-z0-9_/-]*/$",
437
+ "description": "必须等于某个栏目的 path"
438
+ },
439
+ "sort": {
440
+ "type": "number"
441
+ },
442
+ "children": {
443
+ "type": "array",
444
+ "maxItems": 50,
445
+ "items": {
446
+ "$ref": "#/definitions/menu"
447
+ },
448
+ "description": "最多 3 级"
449
+ }
450
+ }
451
+ },
452
+ "unfilled": {
453
+ "type": "object",
454
+ "required": [
455
+ "item",
456
+ "reason"
457
+ ],
458
+ "additionalProperties": false,
459
+ "properties": {
460
+ "item": {
461
+ "type": "string",
462
+ "description": "哪个位置没填,如 categories[2].seoDescription"
463
+ },
464
+ "reason": {
465
+ "enum": [
466
+ "来源缺失",
467
+ "需老板确认",
468
+ "版权不明",
469
+ "平台不支持"
470
+ ],
471
+ "description": "为什么没填"
472
+ },
473
+ "detail": {
474
+ "type": "string",
475
+ "description": "补充说明(谁去补 / 卡在哪)"
476
+ }
477
+ }
478
+ }
479
+ }
480
+ }