@zpress/config 0.3.0 → 0.4.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,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/joggrdocs/zpress/v0.3.0/packages/config/schemas/schema.json",
3
+ "$id": "https://raw.githubusercontent.com/joggrdocs/zpress/v0.4.0/packages/config/schemas/schema.json",
4
4
  "title": "Zpress Configuration",
5
5
  "description": "Configuration file for zpress documentation framework",
6
6
  "$ref": "#/definitions/ZpressConfig",
@@ -92,7 +92,7 @@
92
92
  "tagline": {
93
93
  "type": "string"
94
94
  },
95
- "apps": {
95
+ "workspaces": {
96
96
  "type": "array",
97
97
  "items": {
98
98
  "type": "object",
@@ -123,173 +123,11 @@
123
123
  }
124
124
  ]
125
125
  },
126
- "icon": {
127
- "type": "string"
128
- },
129
- "iconColor": {
130
- "type": "string"
131
- },
132
126
  "description": {
133
127
  "type": "string"
134
128
  },
135
- "tags": {
136
- "type": "array",
137
- "items": {
138
- "type": "string"
139
- }
140
- },
141
- "badge": {
142
- "type": "object",
143
- "properties": {
144
- "src": {
145
- "type": "string"
146
- },
147
- "alt": {
148
- "type": "string"
149
- }
150
- },
151
- "required": [
152
- "src",
153
- "alt"
154
- ],
155
- "additionalProperties": false
156
- },
157
- "prefix": {
158
- "type": "string"
159
- },
160
- "discovery": {
161
- "type": "object",
162
- "properties": {
163
- "from": {
164
- "type": "string"
165
- },
166
- "title": {
167
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
168
- },
169
- "sort": {
170
- "anyOf": [
171
- {
172
- "type": "string",
173
- "enum": [
174
- "default",
175
- "alpha",
176
- "filename"
177
- ]
178
- },
179
- {}
180
- ]
181
- },
182
- "exclude": {
183
- "type": "array",
184
- "items": {
185
- "type": "string"
186
- }
187
- },
188
- "frontmatter": {
189
- "type": "object",
190
- "properties": {
191
- "title": {
192
- "type": "string"
193
- },
194
- "titleTemplate": {
195
- "type": [
196
- "string",
197
- "boolean"
198
- ]
199
- },
200
- "description": {
201
- "type": "string"
202
- },
203
- "layout": {
204
- "type": "string"
205
- },
206
- "sidebar": {
207
- "type": "boolean"
208
- },
209
- "aside": {
210
- "anyOf": [
211
- {
212
- "type": "boolean"
213
- },
214
- {
215
- "type": "string",
216
- "const": "left"
217
- }
218
- ]
219
- },
220
- "outline": {
221
- "anyOf": [
222
- {
223
- "type": "boolean",
224
- "const": false
225
- },
226
- {
227
- "type": "number"
228
- },
229
- {
230
- "type": "array",
231
- "minItems": 2,
232
- "maxItems": 2,
233
- "items": [
234
- {
235
- "type": "number"
236
- },
237
- {
238
- "type": "number"
239
- }
240
- ]
241
- },
242
- {
243
- "type": "string",
244
- "const": "deep"
245
- }
246
- ]
247
- },
248
- "navbar": {
249
- "type": "boolean"
250
- },
251
- "editLink": {
252
- "type": "boolean"
253
- },
254
- "lastUpdated": {
255
- "type": "boolean"
256
- },
257
- "footer": {
258
- "type": "boolean"
259
- },
260
- "pageClass": {
261
- "type": "string"
262
- },
263
- "head": {
264
- "type": "array",
265
- "items": {
266
- "type": "array",
267
- "minItems": 2,
268
- "maxItems": 2,
269
- "items": [
270
- {
271
- "type": "string"
272
- },
273
- {
274
- "type": "object",
275
- "additionalProperties": {
276
- "type": "string"
277
- }
278
- }
279
- ]
280
- }
281
- }
282
- },
283
- "additionalProperties": true
284
- },
285
- "recursive": {
286
- "type": "boolean"
287
- },
288
- "indexFile": {
289
- "type": "string"
290
- }
291
- },
292
- "additionalProperties": false
129
+ "icon": {
130
+ "$ref": "#/definitions/ZpressConfig/properties/icon"
293
131
  },
294
132
  "items": {
295
133
  "type": "array",
@@ -297,62 +135,284 @@
297
135
  "type": "object",
298
136
  "properties": {
299
137
  "title": {
300
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
301
- },
302
- "link": {
303
- "type": "string"
304
- },
305
- "from": {
306
- "type": "string"
138
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/title"
307
139
  },
308
- "prefix": {
309
- "type": "string"
310
- },
311
- "content": {
140
+ "icon": {
312
141
  "anyOf": [
313
142
  {
314
- "type": "string"
143
+ "$ref": "#/definitions/ZpressConfig/properties/icon"
315
144
  },
316
- {}
145
+ {
146
+ "type": "object",
147
+ "properties": {
148
+ "id": {
149
+ "$ref": "#/definitions/ZpressConfig/properties/icon"
150
+ },
151
+ "color": {
152
+ "type": "string"
153
+ }
154
+ },
155
+ "required": [
156
+ "id",
157
+ "color"
158
+ ],
159
+ "additionalProperties": false
160
+ }
317
161
  ]
318
162
  },
319
- "items": {
163
+ "description": {
164
+ "type": "string"
165
+ },
166
+ "tags": {
320
167
  "type": "array",
321
168
  "items": {
322
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/items/items"
169
+ "type": "string"
323
170
  }
324
171
  },
325
- "landing": {
172
+ "badge": {
173
+ "type": "object",
174
+ "properties": {
175
+ "src": {
176
+ "type": "string"
177
+ },
178
+ "alt": {
179
+ "type": "string"
180
+ }
181
+ },
182
+ "required": [
183
+ "src",
184
+ "alt"
185
+ ],
186
+ "additionalProperties": false
187
+ },
188
+ "path": {
189
+ "type": "string"
190
+ },
191
+ "include": {
326
192
  "anyOf": [
327
193
  {
328
- "type": "string",
329
- "enum": [
330
- "auto",
331
- "cards",
332
- "overview"
333
- ]
194
+ "type": "string"
334
195
  },
335
196
  {
336
- "type": "boolean",
337
- "const": false
197
+ "type": "array",
198
+ "items": {
199
+ "type": "string"
200
+ }
338
201
  }
339
202
  ]
340
203
  },
341
- "collapsible": {
342
- "type": "boolean"
343
- },
344
- "exclude": {
204
+ "items": {
345
205
  "type": "array",
346
206
  "items": {
347
- "type": "string"
207
+ "type": "object",
208
+ "properties": {
209
+ "title": {
210
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/title"
211
+ },
212
+ "description": {
213
+ "type": "string"
214
+ },
215
+ "path": {
216
+ "type": "string"
217
+ },
218
+ "include": {
219
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/include"
220
+ },
221
+ "content": {
222
+ "anyOf": [
223
+ {
224
+ "type": "string"
225
+ },
226
+ {}
227
+ ]
228
+ },
229
+ "items": {
230
+ "type": "array",
231
+ "items": {
232
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/items/items"
233
+ }
234
+ },
235
+ "landing": {
236
+ "type": "boolean"
237
+ },
238
+ "collapsible": {
239
+ "type": "boolean"
240
+ },
241
+ "exclude": {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "string"
245
+ }
246
+ },
247
+ "hidden": {
248
+ "type": "boolean"
249
+ },
250
+ "frontmatter": {
251
+ "type": "object",
252
+ "properties": {
253
+ "title": {
254
+ "type": "string"
255
+ },
256
+ "titleTemplate": {
257
+ "type": [
258
+ "string",
259
+ "boolean"
260
+ ]
261
+ },
262
+ "description": {
263
+ "type": "string"
264
+ },
265
+ "layout": {
266
+ "type": "string"
267
+ },
268
+ "sidebar": {
269
+ "type": "boolean"
270
+ },
271
+ "aside": {
272
+ "anyOf": [
273
+ {
274
+ "type": "boolean"
275
+ },
276
+ {
277
+ "type": "string",
278
+ "const": "left"
279
+ }
280
+ ]
281
+ },
282
+ "outline": {
283
+ "anyOf": [
284
+ {
285
+ "type": "boolean",
286
+ "const": false
287
+ },
288
+ {
289
+ "type": "number"
290
+ },
291
+ {
292
+ "type": "array",
293
+ "minItems": 2,
294
+ "maxItems": 2,
295
+ "items": [
296
+ {
297
+ "type": "number"
298
+ },
299
+ {
300
+ "type": "number"
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "type": "string",
306
+ "const": "deep"
307
+ }
308
+ ]
309
+ },
310
+ "navbar": {
311
+ "type": "boolean"
312
+ },
313
+ "editLink": {
314
+ "type": "boolean"
315
+ },
316
+ "lastUpdated": {
317
+ "type": "boolean"
318
+ },
319
+ "footer": {
320
+ "type": "boolean"
321
+ },
322
+ "pageClass": {
323
+ "type": "string"
324
+ },
325
+ "head": {
326
+ "type": "array",
327
+ "items": {
328
+ "type": "array",
329
+ "minItems": 2,
330
+ "maxItems": 2,
331
+ "items": [
332
+ {
333
+ "type": "string"
334
+ },
335
+ {
336
+ "type": "object",
337
+ "additionalProperties": {
338
+ "type": "string"
339
+ }
340
+ }
341
+ ]
342
+ }
343
+ }
344
+ },
345
+ "additionalProperties": true
346
+ },
347
+ "sort": {
348
+ "anyOf": [
349
+ {
350
+ "type": "string",
351
+ "enum": [
352
+ "default",
353
+ "alpha",
354
+ "filename"
355
+ ]
356
+ },
357
+ {}
358
+ ]
359
+ },
360
+ "recursive": {
361
+ "type": "boolean"
362
+ },
363
+ "entryFile": {
364
+ "type": "string"
365
+ },
366
+ "icon": {
367
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/icon"
368
+ },
369
+ "card": {
370
+ "type": "object",
371
+ "properties": {
372
+ "icon": {
373
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/icon"
374
+ },
375
+ "scope": {
376
+ "type": "string"
377
+ },
378
+ "description": {
379
+ "type": "string"
380
+ },
381
+ "tags": {
382
+ "type": "array",
383
+ "items": {
384
+ "type": "string"
385
+ }
386
+ },
387
+ "badge": {
388
+ "type": "object",
389
+ "properties": {
390
+ "src": {
391
+ "type": "string"
392
+ },
393
+ "alt": {
394
+ "type": "string"
395
+ }
396
+ },
397
+ "required": [
398
+ "src",
399
+ "alt"
400
+ ],
401
+ "additionalProperties": false
402
+ }
403
+ },
404
+ "additionalProperties": false
405
+ },
406
+ "standalone": {
407
+ "type": "boolean"
408
+ }
409
+ },
410
+ "required": [
411
+ "title"
412
+ ],
413
+ "additionalProperties": false
348
414
  }
349
415
  },
350
- "hidden": {
351
- "type": "boolean"
352
- },
353
- "frontmatter": {
354
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/discovery/properties/frontmatter"
355
- },
356
416
  "sort": {
357
417
  "anyOf": [
358
418
  {
@@ -364,143 +424,58 @@
364
424
  ]
365
425
  },
366
426
  {
367
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/discovery/properties/sort/anyOf/1"
427
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/items/items/properties/sort/anyOf/1"
368
428
  }
369
429
  ]
370
430
  },
431
+ "exclude": {
432
+ "type": "array",
433
+ "items": {
434
+ "type": "string"
435
+ }
436
+ },
371
437
  "recursive": {
372
438
  "type": "boolean"
373
439
  },
374
- "indexFile": {
375
- "type": "string"
376
- },
377
- "icon": {
440
+ "entryFile": {
378
441
  "type": "string"
379
442
  },
380
- "iconColor": {
381
- "type": "string"
443
+ "frontmatter": {
444
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/items/items/properties/frontmatter"
382
445
  },
383
- "card": {
446
+ "openapi": {
384
447
  "type": "object",
385
448
  "properties": {
386
- "icon": {
387
- "type": "string"
388
- },
389
- "iconColor": {
449
+ "spec": {
390
450
  "type": "string"
391
451
  },
392
- "scope": {
452
+ "path": {
393
453
  "type": "string"
394
454
  },
395
- "description": {
455
+ "title": {
396
456
  "type": "string"
397
457
  },
398
- "tags": {
399
- "type": "array",
400
- "items": {
401
- "type": "string"
402
- }
403
- },
404
- "badge": {
405
- "type": "object",
406
- "properties": {
407
- "src": {
408
- "type": "string"
409
- },
410
- "alt": {
411
- "type": "string"
412
- }
413
- },
414
- "required": [
415
- "src",
416
- "alt"
417
- ],
418
- "additionalProperties": false
458
+ "sidebarLayout": {
459
+ "type": "string",
460
+ "enum": [
461
+ "method-path",
462
+ "title"
463
+ ]
419
464
  }
420
465
  },
466
+ "required": [
467
+ "spec",
468
+ "path"
469
+ ],
421
470
  "additionalProperties": false
422
- },
423
- "isolated": {
424
- "type": "boolean"
425
- },
426
- "titleFrom": {
427
- "type": "string",
428
- "enum": [
429
- "filename",
430
- "heading",
431
- "frontmatter",
432
- "auto"
433
- ]
434
- },
435
- "titleTransform": {
436
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title/anyOf/1/properties/transform"
437
471
  }
438
472
  },
439
473
  "required": [
440
- "title"
474
+ "title",
475
+ "description",
476
+ "path"
441
477
  ],
442
478
  "additionalProperties": false
443
- }
444
- },
445
- "openapi": {
446
- "type": "object",
447
- "properties": {
448
- "spec": {
449
- "type": "string"
450
- },
451
- "prefix": {
452
- "type": "string"
453
- },
454
- "title": {
455
- "type": "string"
456
- },
457
- "sidebarLayout": {
458
- "type": "string",
459
- "enum": [
460
- "method-path",
461
- "title"
462
- ]
463
- }
464
- },
465
- "required": [
466
- "spec",
467
- "prefix"
468
- ],
469
- "additionalProperties": false
470
- }
471
- },
472
- "required": [
473
- "title",
474
- "description",
475
- "prefix"
476
- ],
477
- "additionalProperties": false
478
- }
479
- },
480
- "packages": {
481
- "type": "array",
482
- "items": {
483
- "$ref": "#/definitions/ZpressConfig/properties/apps/items"
484
- }
485
- },
486
- "workspaces": {
487
- "type": "array",
488
- "items": {
489
- "type": "object",
490
- "properties": {
491
- "title": {
492
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
493
- },
494
- "description": {
495
- "type": "string"
496
- },
497
- "icon": {
498
- "type": "string"
499
- },
500
- "items": {
501
- "type": "array",
502
- "items": {
503
- "$ref": "#/definitions/ZpressConfig/properties/apps/items"
504
479
  },
505
480
  "minItems": 1
506
481
  },
@@ -510,7 +485,6 @@
510
485
  },
511
486
  "required": [
512
487
  "title",
513
- "description",
514
488
  "icon",
515
489
  "items"
516
490
  ],
@@ -523,7 +497,7 @@
523
497
  "type": "object",
524
498
  "properties": {
525
499
  "title": {
526
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
500
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/title"
527
501
  },
528
502
  "description": {
529
503
  "type": "string"
@@ -532,7 +506,7 @@
532
506
  "type": "string"
533
507
  },
534
508
  "icon": {
535
- "type": "string"
509
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/icon"
536
510
  }
537
511
  },
538
512
  "required": [
@@ -584,26 +558,22 @@
584
558
  "type": "string"
585
559
  },
586
560
  "icon": {
587
- "anyOf": [
588
- {
589
- "type": "string"
590
- },
591
- {
592
- "type": "object",
593
- "properties": {
594
- "id": {
595
- "type": "string"
596
- },
597
- "color": {
598
- "type": "string"
599
- }
600
- },
601
- "required": [
602
- "id",
603
- "color"
604
- ],
605
- "additionalProperties": false
606
- }
561
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/icon"
562
+ },
563
+ "style": {
564
+ "type": "string",
565
+ "enum": [
566
+ "brand",
567
+ "alt",
568
+ "ghost"
569
+ ]
570
+ },
571
+ "shape": {
572
+ "type": "string",
573
+ "enum": [
574
+ "square",
575
+ "rounded",
576
+ "circle"
607
577
  ]
608
578
  }
609
579
  },
@@ -626,7 +596,7 @@
626
596
  "sections": {
627
597
  "type": "array",
628
598
  "items": {
629
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/items/items"
599
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/items/items"
630
600
  },
631
601
  "minItems": 1
632
602
  },
@@ -670,6 +640,128 @@
670
640
  "items": {
671
641
  "type": "string"
672
642
  }
643
+ },
644
+ "home": {
645
+ "type": "object",
646
+ "properties": {
647
+ "features": {
648
+ "type": "object",
649
+ "properties": {
650
+ "columns": {
651
+ "type": "number",
652
+ "enum": [
653
+ 1,
654
+ 2,
655
+ 3,
656
+ 4
657
+ ]
658
+ },
659
+ "truncate": {
660
+ "type": "object",
661
+ "properties": {
662
+ "title": {
663
+ "type": "integer",
664
+ "minimum": 1
665
+ },
666
+ "description": {
667
+ "type": "integer",
668
+ "minimum": 1
669
+ }
670
+ },
671
+ "additionalProperties": false
672
+ }
673
+ },
674
+ "additionalProperties": false
675
+ },
676
+ "workspaces": {
677
+ "$ref": "#/definitions/ZpressConfig/properties/home/properties/features"
678
+ }
679
+ },
680
+ "additionalProperties": false
681
+ },
682
+ "socialLinks": {
683
+ "type": "array",
684
+ "items": {
685
+ "type": "object",
686
+ "properties": {
687
+ "icon": {
688
+ "anyOf": [
689
+ {
690
+ "type": "string",
691
+ "enum": [
692
+ "lark",
693
+ "discord",
694
+ "facebook",
695
+ "github",
696
+ "instagram",
697
+ "linkedin",
698
+ "slack",
699
+ "x",
700
+ "youtube",
701
+ "wechat",
702
+ "qq",
703
+ "juejin",
704
+ "zhihu",
705
+ "bilibili",
706
+ "weibo",
707
+ "gitlab",
708
+ "X",
709
+ "bluesky",
710
+ "npm"
711
+ ]
712
+ },
713
+ {
714
+ "type": "object",
715
+ "properties": {
716
+ "svg": {
717
+ "type": "string"
718
+ }
719
+ },
720
+ "required": [
721
+ "svg"
722
+ ],
723
+ "additionalProperties": false
724
+ }
725
+ ]
726
+ },
727
+ "mode": {
728
+ "type": "string",
729
+ "enum": [
730
+ "link",
731
+ "text",
732
+ "img",
733
+ "dom"
734
+ ]
735
+ },
736
+ "content": {
737
+ "type": "string"
738
+ }
739
+ },
740
+ "required": [
741
+ "icon",
742
+ "mode",
743
+ "content"
744
+ ],
745
+ "additionalProperties": false
746
+ }
747
+ },
748
+ "footer": {
749
+ "type": "object",
750
+ "properties": {
751
+ "message": {
752
+ "type": "string"
753
+ },
754
+ "copyright": {
755
+ "type": "string"
756
+ },
757
+ "socials": {
758
+ "type": "boolean"
759
+ }
760
+ },
761
+ "additionalProperties": false
762
+ },
763
+ "openapi": {
764
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/openapi"
673
765
  }
674
766
  },
675
767
  "required": [