@zpress/config 0.2.2 → 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.2.2/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",
@@ -113,7 +113,8 @@
113
113
  "heading",
114
114
  "frontmatter"
115
115
  ]
116
- }
116
+ },
117
+ "transform": {}
117
118
  },
118
119
  "required": [
119
120
  "from"
@@ -122,171 +123,11 @@
122
123
  }
123
124
  ]
124
125
  },
125
- "icon": {
126
- "type": "string"
127
- },
128
- "iconColor": {
129
- "type": "string"
130
- },
131
126
  "description": {
132
127
  "type": "string"
133
128
  },
134
- "tags": {
135
- "type": "array",
136
- "items": {
137
- "type": "string"
138
- }
139
- },
140
- "badge": {
141
- "type": "object",
142
- "properties": {
143
- "src": {
144
- "type": "string"
145
- },
146
- "alt": {
147
- "type": "string"
148
- }
149
- },
150
- "required": [
151
- "src",
152
- "alt"
153
- ],
154
- "additionalProperties": false
155
- },
156
- "prefix": {
157
- "type": "string"
158
- },
159
- "discovery": {
160
- "type": "object",
161
- "properties": {
162
- "from": {
163
- "type": "string"
164
- },
165
- "title": {
166
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
167
- },
168
- "sort": {
169
- "anyOf": [
170
- {
171
- "type": "string",
172
- "enum": [
173
- "alpha",
174
- "filename"
175
- ]
176
- }
177
- ]
178
- },
179
- "exclude": {
180
- "type": "array",
181
- "items": {
182
- "type": "string"
183
- }
184
- },
185
- "frontmatter": {
186
- "type": "object",
187
- "properties": {
188
- "title": {
189
- "type": "string"
190
- },
191
- "titleTemplate": {
192
- "type": [
193
- "string",
194
- "boolean"
195
- ]
196
- },
197
- "description": {
198
- "type": "string"
199
- },
200
- "layout": {
201
- "type": "string"
202
- },
203
- "sidebar": {
204
- "type": "boolean"
205
- },
206
- "aside": {
207
- "anyOf": [
208
- {
209
- "type": "boolean"
210
- },
211
- {
212
- "type": "string",
213
- "const": "left"
214
- }
215
- ]
216
- },
217
- "outline": {
218
- "anyOf": [
219
- {
220
- "type": "boolean",
221
- "const": false
222
- },
223
- {
224
- "type": "number"
225
- },
226
- {
227
- "type": "array",
228
- "minItems": 2,
229
- "maxItems": 2,
230
- "items": [
231
- {
232
- "type": "number"
233
- },
234
- {
235
- "type": "number"
236
- }
237
- ]
238
- },
239
- {
240
- "type": "string",
241
- "const": "deep"
242
- }
243
- ]
244
- },
245
- "navbar": {
246
- "type": "boolean"
247
- },
248
- "editLink": {
249
- "type": "boolean"
250
- },
251
- "lastUpdated": {
252
- "type": "boolean"
253
- },
254
- "footer": {
255
- "type": "boolean"
256
- },
257
- "pageClass": {
258
- "type": "string"
259
- },
260
- "head": {
261
- "type": "array",
262
- "items": {
263
- "type": "array",
264
- "minItems": 2,
265
- "maxItems": 2,
266
- "items": [
267
- {
268
- "type": "string"
269
- },
270
- {
271
- "type": "object",
272
- "additionalProperties": {
273
- "type": "string"
274
- }
275
- }
276
- ]
277
- }
278
- }
279
- },
280
- "additionalProperties": true
281
- },
282
- "recursive": {
283
- "type": "boolean"
284
- },
285
- "indexFile": {
286
- "type": "string"
287
- }
288
- },
289
- "additionalProperties": false
129
+ "icon": {
130
+ "$ref": "#/definitions/ZpressConfig/properties/icon"
290
131
  },
291
132
  "items": {
292
133
  "type": "array",
@@ -294,221 +135,468 @@
294
135
  "type": "object",
295
136
  "properties": {
296
137
  "title": {
297
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
138
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/title"
298
139
  },
299
- "link": {
300
- "type": "string"
140
+ "icon": {
141
+ "anyOf": [
142
+ {
143
+ "$ref": "#/definitions/ZpressConfig/properties/icon"
144
+ },
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
+ }
161
+ ]
301
162
  },
302
- "from": {
163
+ "description": {
303
164
  "type": "string"
304
165
  },
305
- "prefix": {
166
+ "tags": {
167
+ "type": "array",
168
+ "items": {
169
+ "type": "string"
170
+ }
171
+ },
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": {
306
189
  "type": "string"
307
190
  },
308
- "content": {
191
+ "include": {
309
192
  "anyOf": [
310
193
  {
311
194
  "type": "string"
195
+ },
196
+ {
197
+ "type": "array",
198
+ "items": {
199
+ "type": "string"
200
+ }
312
201
  }
313
202
  ]
314
203
  },
315
204
  "items": {
316
205
  "type": "array",
317
206
  "items": {
318
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/items/items"
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
319
414
  }
320
415
  },
321
- "landing": {
416
+ "sort": {
322
417
  "anyOf": [
323
418
  {
324
419
  "type": "string",
325
420
  "enum": [
326
- "auto",
327
- "cards",
328
- "overview"
421
+ "default",
422
+ "alpha",
423
+ "filename"
329
424
  ]
330
425
  },
331
426
  {
332
- "type": "boolean",
333
- "const": false
427
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/items/items/properties/sort/anyOf/1"
334
428
  }
335
429
  ]
336
430
  },
337
- "collapsible": {
338
- "type": "boolean"
339
- },
340
431
  "exclude": {
341
432
  "type": "array",
342
433
  "items": {
343
434
  "type": "string"
344
435
  }
345
436
  },
346
- "hidden": {
347
- "type": "boolean"
348
- },
349
- "frontmatter": {
350
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/discovery/properties/frontmatter"
351
- },
352
- "sort": {
353
- "anyOf": [
354
- {
355
- "type": "string",
356
- "enum": [
357
- "alpha",
358
- "filename"
359
- ]
360
- }
361
- ]
362
- },
363
437
  "recursive": {
364
438
  "type": "boolean"
365
439
  },
366
- "indexFile": {
440
+ "entryFile": {
367
441
  "type": "string"
368
442
  },
369
- "icon": {
370
- "type": "string"
371
- },
372
- "iconColor": {
373
- "type": "string"
443
+ "frontmatter": {
444
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/items/items/properties/frontmatter"
374
445
  },
375
- "card": {
446
+ "openapi": {
376
447
  "type": "object",
377
448
  "properties": {
378
- "icon": {
449
+ "spec": {
379
450
  "type": "string"
380
451
  },
381
- "iconColor": {
452
+ "path": {
382
453
  "type": "string"
383
454
  },
384
- "scope": {
455
+ "title": {
385
456
  "type": "string"
386
457
  },
387
- "description": {
388
- "type": "string"
389
- },
390
- "tags": {
391
- "type": "array",
392
- "items": {
393
- "type": "string"
394
- }
395
- },
396
- "badge": {
397
- "type": "object",
398
- "properties": {
399
- "src": {
400
- "type": "string"
401
- },
402
- "alt": {
403
- "type": "string"
404
- }
405
- },
406
- "required": [
407
- "src",
408
- "alt"
409
- ],
410
- "additionalProperties": false
458
+ "sidebarLayout": {
459
+ "type": "string",
460
+ "enum": [
461
+ "method-path",
462
+ "title"
463
+ ]
411
464
  }
412
465
  },
466
+ "required": [
467
+ "spec",
468
+ "path"
469
+ ],
413
470
  "additionalProperties": false
414
- },
415
- "isolated": {
416
- "type": "boolean"
417
- },
418
- "titleFrom": {
419
- "type": "string",
420
- "enum": [
421
- "filename",
422
- "heading",
423
- "frontmatter",
424
- "auto"
425
- ]
426
471
  }
427
472
  },
428
473
  "required": [
429
- "title"
474
+ "title",
475
+ "description",
476
+ "path"
430
477
  ],
431
478
  "additionalProperties": false
432
- }
479
+ },
480
+ "minItems": 1
481
+ },
482
+ "link": {
483
+ "type": "string"
433
484
  }
434
485
  },
435
486
  "required": [
436
487
  "title",
437
- "description",
438
- "prefix"
488
+ "icon",
489
+ "items"
439
490
  ],
440
491
  "additionalProperties": false
441
492
  }
442
493
  },
443
- "packages": {
444
- "type": "array",
445
- "items": {
446
- "$ref": "#/definitions/ZpressConfig/properties/apps/items"
447
- }
448
- },
449
- "workspaces": {
494
+ "features": {
450
495
  "type": "array",
451
496
  "items": {
452
497
  "type": "object",
453
498
  "properties": {
454
499
  "title": {
455
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
500
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/title"
456
501
  },
457
502
  "description": {
458
503
  "type": "string"
459
504
  },
460
- "icon": {
461
- "type": "string"
462
- },
463
- "items": {
464
- "type": "array",
465
- "items": {
466
- "$ref": "#/definitions/ZpressConfig/properties/apps/items"
467
- },
468
- "minItems": 1
469
- },
470
505
  "link": {
471
506
  "type": "string"
507
+ },
508
+ "icon": {
509
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/icon"
472
510
  }
473
511
  },
474
512
  "required": [
475
513
  "title",
476
- "description",
477
- "icon",
478
- "items"
514
+ "description"
479
515
  ],
480
516
  "additionalProperties": false
481
517
  }
482
518
  },
483
- "features": {
519
+ "actions": {
484
520
  "type": "array",
485
521
  "items": {
486
522
  "type": "object",
487
523
  "properties": {
488
- "title": {
489
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
524
+ "theme": {
525
+ "type": "string",
526
+ "enum": [
527
+ "brand",
528
+ "alt"
529
+ ]
490
530
  },
491
- "description": {
531
+ "text": {
492
532
  "type": "string"
493
533
  },
494
534
  "link": {
495
535
  "type": "string"
496
- },
497
- "icon": {
498
- "type": "string"
499
536
  }
500
537
  },
501
538
  "required": [
502
- "title",
503
- "description"
539
+ "theme",
540
+ "text",
541
+ "link"
504
542
  ],
505
543
  "additionalProperties": false
506
544
  }
507
545
  },
546
+ "sidebar": {
547
+ "type": "object",
548
+ "properties": {
549
+ "above": {
550
+ "type": "array",
551
+ "items": {
552
+ "type": "object",
553
+ "properties": {
554
+ "text": {
555
+ "type": "string"
556
+ },
557
+ "link": {
558
+ "type": "string"
559
+ },
560
+ "icon": {
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"
577
+ ]
578
+ }
579
+ },
580
+ "required": [
581
+ "text",
582
+ "link"
583
+ ],
584
+ "additionalProperties": false
585
+ }
586
+ },
587
+ "below": {
588
+ "type": "array",
589
+ "items": {
590
+ "$ref": "#/definitions/ZpressConfig/properties/sidebar/properties/above/items"
591
+ }
592
+ }
593
+ },
594
+ "additionalProperties": false
595
+ },
508
596
  "sections": {
509
597
  "type": "array",
510
598
  "items": {
511
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/items/items"
599
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/items/items"
512
600
  },
513
601
  "minItems": 1
514
602
  },
@@ -523,7 +611,7 @@
523
611
  "items": {
524
612
  "type": "object",
525
613
  "properties": {
526
- "text": {
614
+ "title": {
527
615
  "type": "string"
528
616
  },
529
617
  "link": {
@@ -540,7 +628,7 @@
540
628
  }
541
629
  },
542
630
  "required": [
543
- "text"
631
+ "title"
544
632
  ],
545
633
  "additionalProperties": false
546
634
  }
@@ -553,24 +641,127 @@
553
641
  "type": "string"
554
642
  }
555
643
  },
556
- "openapi": {
644
+ "home": {
557
645
  "type": "object",
558
646
  "properties": {
559
- "spec": {
560
- "type": "string"
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
+ }
561
739
  },
562
- "prefix": {
740
+ "required": [
741
+ "icon",
742
+ "mode",
743
+ "content"
744
+ ],
745
+ "additionalProperties": false
746
+ }
747
+ },
748
+ "footer": {
749
+ "type": "object",
750
+ "properties": {
751
+ "message": {
563
752
  "type": "string"
564
753
  },
565
- "title": {
754
+ "copyright": {
566
755
  "type": "string"
756
+ },
757
+ "socials": {
758
+ "type": "boolean"
567
759
  }
568
760
  },
569
- "required": [
570
- "spec",
571
- "prefix"
572
- ],
573
761
  "additionalProperties": false
762
+ },
763
+ "openapi": {
764
+ "$ref": "#/definitions/ZpressConfig/properties/workspaces/items/properties/items/items/properties/openapi"
574
765
  }
575
766
  },
576
767
  "required": [