@aravindc26/velu 0.10.0 → 0.11.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.
- package/package.json +1 -1
- package/schema/velu.schema.json +714 -16
- package/src/build.ts +207 -43
- package/src/cli.ts +65 -2
- package/src/engine/_server.mjs +127 -18
- package/src/engine/app/(docs)/[[...slug]]/layout.tsx +87 -0
- package/src/engine/app/(docs)/[[...slug]]/page.tsx +83 -6
- package/src/engine/app/(docs)/layout.tsx +1 -13
- package/src/engine/app/global.css +327 -0
- package/src/engine/app/layout.tsx +3 -7
- package/src/engine/app/search.css +20 -0
- package/src/engine/components/lang-switcher.tsx +95 -0
- package/src/engine/components/product-switcher.tsx +78 -0
- package/src/engine/components/providers.tsx +26 -0
- package/src/engine/components/search.tsx +66 -3
- package/src/engine/components/sidebar-links.tsx +51 -0
- package/src/engine/components/theme-toggle.tsx +39 -0
- package/src/engine/components/version-switcher.tsx +89 -0
- package/src/engine/lib/layout.shared.ts +28 -6
- package/src/engine/lib/navigation-normalize.mjs +456 -0
- package/src/engine/lib/navigation-normalize.ts +488 -0
- package/src/engine/lib/source.ts +14 -0
- package/src/engine/lib/velu.ts +267 -3
- package/src/engine/next.config.mjs +2 -2
- package/src/engine/src/lib/velu.ts +86 -13
- package/src/navigation-normalize.ts +488 -0
- package/src/validate.ts +116 -18
package/schema/velu.schema.json
CHANGED
|
@@ -73,20 +73,118 @@
|
|
|
73
73
|
},
|
|
74
74
|
"additionalProperties": false
|
|
75
75
|
},
|
|
76
|
+
"languages": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"description": "Supported language codes (e.g. [\"en\", \"es\", \"ja\"]). The first is the default. Display labels are auto-derived.",
|
|
79
|
+
"items": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "BCP 47 language code (e.g. en, es, fr, ja, zh)."
|
|
82
|
+
},
|
|
83
|
+
"minItems": 1
|
|
84
|
+
},
|
|
76
85
|
"navigation": {
|
|
77
86
|
"type": "object",
|
|
78
|
-
"description": "Defines the site navigation hierarchy
|
|
79
|
-
"required": ["tabs"],
|
|
87
|
+
"description": "Defines the site navigation hierarchy. Use 'tabs' for single-language sites, or 'languages' for per-language navigation (like Mintlify).",
|
|
80
88
|
"properties": {
|
|
81
89
|
"tabs": {
|
|
82
90
|
"type": "array",
|
|
83
|
-
"description": "Top-level navigation tabs.
|
|
91
|
+
"description": "Top-level navigation tabs (single-language mode). Ignored when 'languages' is present.",
|
|
84
92
|
"items": {
|
|
85
93
|
"$ref": "#/definitions/tab"
|
|
86
94
|
},
|
|
87
95
|
"minItems": 1
|
|
96
|
+
},
|
|
97
|
+
"dropdowns": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"description": "Top-level dropdown containers. Each dropdown can include groups, pages, anchors, or links.",
|
|
100
|
+
"items": {
|
|
101
|
+
"$ref": "#/definitions/dropdown"
|
|
102
|
+
},
|
|
103
|
+
"minItems": 1
|
|
104
|
+
},
|
|
105
|
+
"groups": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"description": "Top-level sidebar groups when tabs/dropdowns are not used.",
|
|
108
|
+
"items": {
|
|
109
|
+
"$ref": "#/definitions/group"
|
|
110
|
+
},
|
|
111
|
+
"minItems": 1
|
|
112
|
+
},
|
|
113
|
+
"pages": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"description": "Top-level pages when tabs/dropdowns are not used.",
|
|
116
|
+
"items": {
|
|
117
|
+
"oneOf": [
|
|
118
|
+
{ "$ref": "#/definitions/page" },
|
|
119
|
+
{ "$ref": "#/definitions/separator" },
|
|
120
|
+
{ "$ref": "#/definitions/link" }
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"minItems": 1
|
|
124
|
+
},
|
|
125
|
+
"languages": {
|
|
126
|
+
"type": "array",
|
|
127
|
+
"description": "Per-language navigation. Each entry defines tabs/groups/pages for one language. First entry is the default language (no URL prefix).",
|
|
128
|
+
"items": {
|
|
129
|
+
"$ref": "#/definitions/languageNav"
|
|
130
|
+
},
|
|
131
|
+
"minItems": 1
|
|
132
|
+
},
|
|
133
|
+
"products": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"description": "Multi-product navigation. Each product can define its own tabs or top-level pages.",
|
|
136
|
+
"items": {
|
|
137
|
+
"$ref": "#/definitions/productNav"
|
|
138
|
+
},
|
|
139
|
+
"minItems": 1
|
|
140
|
+
},
|
|
141
|
+
"versions": {
|
|
142
|
+
"type": "array",
|
|
143
|
+
"description": "Versioned navigation. Each version defines its own set of tabs.",
|
|
144
|
+
"items": {
|
|
145
|
+
"$ref": "#/definitions/versionNav"
|
|
146
|
+
},
|
|
147
|
+
"minItems": 1
|
|
148
|
+
},
|
|
149
|
+
"anchors": {
|
|
150
|
+
"type": "array",
|
|
151
|
+
"description": "Prominent external links displayed in the navbar (e.g. GitHub, Discord).",
|
|
152
|
+
"items": {
|
|
153
|
+
"$ref": "#/definitions/anchor"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"global": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"description": "Cross-cutting navigation elements visible on every page.",
|
|
159
|
+
"properties": {
|
|
160
|
+
"tabs": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"description": "Global external tabs shown across all pages.",
|
|
163
|
+
"items": {
|
|
164
|
+
"$ref": "#/definitions/globalTab"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"anchors": {
|
|
168
|
+
"type": "array",
|
|
169
|
+
"description": "Global anchors shown across all tabs.",
|
|
170
|
+
"items": {
|
|
171
|
+
"$ref": "#/definitions/anchor"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"additionalProperties": false
|
|
88
176
|
}
|
|
89
177
|
},
|
|
178
|
+
"anyOf": [
|
|
179
|
+
{ "required": ["tabs"] },
|
|
180
|
+
{ "required": ["dropdowns"] },
|
|
181
|
+
{ "required": ["groups"] },
|
|
182
|
+
{ "required": ["pages"] },
|
|
183
|
+
{ "required": ["languages"] },
|
|
184
|
+
{ "required": ["products"] },
|
|
185
|
+
{ "required": ["versions"] },
|
|
186
|
+
{ "required": ["anchors"] }
|
|
187
|
+
],
|
|
90
188
|
"additionalProperties": false
|
|
91
189
|
}
|
|
92
190
|
},
|
|
@@ -94,12 +192,27 @@
|
|
|
94
192
|
"definitions": {
|
|
95
193
|
"page": {
|
|
96
194
|
"type": "string",
|
|
97
|
-
"description": "
|
|
195
|
+
"description": "Explicit markdown file path relative to the docs directory (without .md extension). No automatic language fallback is applied. Example: 'quickstart' → docs/quickstart.md, 'ja/quickstart' → docs/ja/quickstart.md, 'writing-content/page' → docs/writing-content/page.md."
|
|
196
|
+
},
|
|
197
|
+
"href": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "Navigation link target. Supports absolute URLs and internal paths (for example '/changelog' or 'guides/intro').",
|
|
200
|
+
"anyOf": [
|
|
201
|
+
{
|
|
202
|
+
"format": "uri"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"pattern": "^/[^\\s]*$"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"pattern": "^(?![a-zA-Z][a-zA-Z\\d+.-]*:)[^\\s]+$"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
98
211
|
},
|
|
99
212
|
"group": {
|
|
100
213
|
"type": "object",
|
|
101
214
|
"description": "A group of pages, optionally nested.",
|
|
102
|
-
"required": ["group", "
|
|
215
|
+
"required": ["group", "pages"],
|
|
103
216
|
"properties": {
|
|
104
217
|
"group": {
|
|
105
218
|
"type": "string",
|
|
@@ -123,13 +236,24 @@
|
|
|
123
236
|
"description": "Whether the group is expanded by default. Defaults to true.",
|
|
124
237
|
"default": true
|
|
125
238
|
},
|
|
239
|
+
"description": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"description": "Optional description displayed below the group name."
|
|
242
|
+
},
|
|
243
|
+
"hidden": {
|
|
244
|
+
"type": "boolean",
|
|
245
|
+
"description": "Whether the group is hidden from navigation. Defaults to false.",
|
|
246
|
+
"default": false
|
|
247
|
+
},
|
|
126
248
|
"pages": {
|
|
127
249
|
"type": "array",
|
|
128
|
-
"description": "Pages
|
|
250
|
+
"description": "Pages, nested groups, separators, or external links within this group.",
|
|
129
251
|
"items": {
|
|
130
252
|
"oneOf": [
|
|
131
253
|
{ "$ref": "#/definitions/page" },
|
|
132
|
-
{ "$ref": "#/definitions/group" }
|
|
254
|
+
{ "$ref": "#/definitions/group" },
|
|
255
|
+
{ "$ref": "#/definitions/separator" },
|
|
256
|
+
{ "$ref": "#/definitions/link" }
|
|
133
257
|
]
|
|
134
258
|
}
|
|
135
259
|
}
|
|
@@ -139,7 +263,7 @@
|
|
|
139
263
|
"tab": {
|
|
140
264
|
"type": "object",
|
|
141
265
|
"description": "A top-level navigation tab.",
|
|
142
|
-
"required": ["tab"
|
|
266
|
+
"required": ["tab"],
|
|
143
267
|
"properties": {
|
|
144
268
|
"tab": {
|
|
145
269
|
"type": "string",
|
|
@@ -147,7 +271,7 @@
|
|
|
147
271
|
},
|
|
148
272
|
"slug": {
|
|
149
273
|
"type": "string",
|
|
150
|
-
"description": "URL slug prefix for pages in this tab.
|
|
274
|
+
"description": "Optional URL slug prefix for pages in this tab. If omitted, Velu derives one from the tab label.",
|
|
151
275
|
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
|
|
152
276
|
},
|
|
153
277
|
"icon": {
|
|
@@ -155,15 +279,17 @@
|
|
|
155
279
|
"description": "Icon identifier for the tab."
|
|
156
280
|
},
|
|
157
281
|
"href": {
|
|
158
|
-
"
|
|
159
|
-
"description": "External link URL. When set, the tab links externally instead of showing pages.",
|
|
160
|
-
"format": "uri"
|
|
282
|
+
"$ref": "#/definitions/href"
|
|
161
283
|
},
|
|
162
284
|
"pages": {
|
|
163
285
|
"type": "array",
|
|
164
|
-
"description": "Standalone pages directly under this tab.",
|
|
286
|
+
"description": "Standalone pages, separators, or external links directly under this tab.",
|
|
165
287
|
"items": {
|
|
166
|
-
"
|
|
288
|
+
"oneOf": [
|
|
289
|
+
{ "$ref": "#/definitions/page" },
|
|
290
|
+
{ "$ref": "#/definitions/separator" },
|
|
291
|
+
{ "$ref": "#/definitions/link" }
|
|
292
|
+
]
|
|
167
293
|
}
|
|
168
294
|
},
|
|
169
295
|
"groups": {
|
|
@@ -172,6 +298,107 @@
|
|
|
172
298
|
"items": {
|
|
173
299
|
"$ref": "#/definitions/group"
|
|
174
300
|
}
|
|
301
|
+
},
|
|
302
|
+
"menu": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"description": "Optional menu items for this tab. Each menu item is normalized into a sidebar group.",
|
|
305
|
+
"items": {
|
|
306
|
+
"$ref": "#/definitions/menuItem"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"anchors": {
|
|
310
|
+
"type": "array",
|
|
311
|
+
"description": "Anchors nested under this tab.",
|
|
312
|
+
"items": {
|
|
313
|
+
"$ref": "#/definitions/anchor"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"dropdowns": {
|
|
317
|
+
"type": "array",
|
|
318
|
+
"description": "Dropdowns nested under this tab.",
|
|
319
|
+
"items": {
|
|
320
|
+
"$ref": "#/definitions/dropdown"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"additionalProperties": false,
|
|
325
|
+
"oneOf": [
|
|
326
|
+
{
|
|
327
|
+
"required": ["href"],
|
|
328
|
+
"not": {
|
|
329
|
+
"anyOf": [
|
|
330
|
+
{ "required": ["pages"] },
|
|
331
|
+
{ "required": ["groups"] },
|
|
332
|
+
{ "required": ["menu"] },
|
|
333
|
+
{ "required": ["anchors"] },
|
|
334
|
+
{ "required": ["dropdowns"] }
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"not": { "required": ["href"] },
|
|
340
|
+
"anyOf": [
|
|
341
|
+
{ "required": ["pages"] },
|
|
342
|
+
{ "required": ["groups"] },
|
|
343
|
+
{ "required": ["menu"] },
|
|
344
|
+
{ "required": ["anchors"] },
|
|
345
|
+
{ "required": ["dropdowns"] }
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"dropdown": {
|
|
351
|
+
"type": "object",
|
|
352
|
+
"description": "A dropdown navigation container.",
|
|
353
|
+
"required": ["dropdown"],
|
|
354
|
+
"properties": {
|
|
355
|
+
"dropdown": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "Display label for the dropdown."
|
|
358
|
+
},
|
|
359
|
+
"slug": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"description": "Optional URL slug for this dropdown.",
|
|
362
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
|
|
363
|
+
},
|
|
364
|
+
"icon": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"description": "Icon identifier for the dropdown."
|
|
367
|
+
},
|
|
368
|
+
"href": {
|
|
369
|
+
"$ref": "#/definitions/href"
|
|
370
|
+
},
|
|
371
|
+
"pages": {
|
|
372
|
+
"type": "array",
|
|
373
|
+
"description": "Pages directly under this dropdown.",
|
|
374
|
+
"items": {
|
|
375
|
+
"oneOf": [
|
|
376
|
+
{ "$ref": "#/definitions/page" },
|
|
377
|
+
{ "$ref": "#/definitions/separator" },
|
|
378
|
+
{ "$ref": "#/definitions/link" }
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"groups": {
|
|
383
|
+
"type": "array",
|
|
384
|
+
"description": "Groups nested under this dropdown.",
|
|
385
|
+
"items": {
|
|
386
|
+
"$ref": "#/definitions/group"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"menu": {
|
|
390
|
+
"type": "array",
|
|
391
|
+
"description": "Menu items nested under this dropdown.",
|
|
392
|
+
"items": {
|
|
393
|
+
"$ref": "#/definitions/menuItem"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"anchors": {
|
|
397
|
+
"type": "array",
|
|
398
|
+
"description": "Anchors nested under this dropdown.",
|
|
399
|
+
"items": {
|
|
400
|
+
"$ref": "#/definitions/anchor"
|
|
401
|
+
}
|
|
175
402
|
}
|
|
176
403
|
},
|
|
177
404
|
"additionalProperties": false,
|
|
@@ -181,18 +408,489 @@
|
|
|
181
408
|
"not": {
|
|
182
409
|
"anyOf": [
|
|
183
410
|
{ "required": ["pages"] },
|
|
184
|
-
{ "required": ["groups"] }
|
|
411
|
+
{ "required": ["groups"] },
|
|
412
|
+
{ "required": ["menu"] },
|
|
413
|
+
{ "required": ["anchors"] }
|
|
414
|
+
]
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"not": { "required": ["href"] },
|
|
419
|
+
"anyOf": [
|
|
420
|
+
{ "required": ["pages"] },
|
|
421
|
+
{ "required": ["groups"] },
|
|
422
|
+
{ "required": ["menu"] },
|
|
423
|
+
{ "required": ["anchors"] }
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
"menuItem": {
|
|
429
|
+
"type": "object",
|
|
430
|
+
"description": "A named menu item within a tab. Normalized into a sidebar group.",
|
|
431
|
+
"required": ["item"],
|
|
432
|
+
"properties": {
|
|
433
|
+
"item": {
|
|
434
|
+
"type": "string",
|
|
435
|
+
"description": "Display label for the menu item."
|
|
436
|
+
},
|
|
437
|
+
"icon": {
|
|
438
|
+
"type": "string",
|
|
439
|
+
"description": "Icon identifier for the menu item."
|
|
440
|
+
},
|
|
441
|
+
"pages": {
|
|
442
|
+
"type": "array",
|
|
443
|
+
"description": "Pages directly under this menu item.",
|
|
444
|
+
"items": {
|
|
445
|
+
"oneOf": [
|
|
446
|
+
{ "$ref": "#/definitions/page" },
|
|
447
|
+
{ "$ref": "#/definitions/separator" },
|
|
448
|
+
{ "$ref": "#/definitions/link" }
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"groups": {
|
|
453
|
+
"type": "array",
|
|
454
|
+
"description": "Groups nested under this menu item.",
|
|
455
|
+
"items": {
|
|
456
|
+
"$ref": "#/definitions/group"
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
"additionalProperties": false,
|
|
461
|
+
"anyOf": [
|
|
462
|
+
{ "required": ["pages"] },
|
|
463
|
+
{ "required": ["groups"] }
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
"separator": {
|
|
467
|
+
"type": "object",
|
|
468
|
+
"description": "A visual separator/label in the sidebar navigation.",
|
|
469
|
+
"required": ["separator"],
|
|
470
|
+
"properties": {
|
|
471
|
+
"separator": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"description": "Label text for the separator."
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"additionalProperties": false
|
|
477
|
+
},
|
|
478
|
+
"link": {
|
|
479
|
+
"type": "object",
|
|
480
|
+
"description": "An external link displayed in the sidebar.",
|
|
481
|
+
"required": ["href", "label"],
|
|
482
|
+
"properties": {
|
|
483
|
+
"href": {
|
|
484
|
+
"$ref": "#/definitions/href"
|
|
485
|
+
},
|
|
486
|
+
"label": {
|
|
487
|
+
"type": "string",
|
|
488
|
+
"description": "Display text for the link."
|
|
489
|
+
},
|
|
490
|
+
"icon": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"description": "Icon identifier for the link."
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"additionalProperties": false
|
|
496
|
+
},
|
|
497
|
+
"anchor": {
|
|
498
|
+
"type": "object",
|
|
499
|
+
"description": "A prominent navigation anchor. Can be an external link or a container of tabs.",
|
|
500
|
+
"required": ["anchor"],
|
|
501
|
+
"properties": {
|
|
502
|
+
"anchor": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"description": "Display name for the anchor."
|
|
505
|
+
},
|
|
506
|
+
"href": {
|
|
507
|
+
"$ref": "#/definitions/href"
|
|
508
|
+
},
|
|
509
|
+
"tabs": {
|
|
510
|
+
"type": "array",
|
|
511
|
+
"description": "Optional tabs promoted to top-level navigation under this anchor.",
|
|
512
|
+
"items": {
|
|
513
|
+
"$ref": "#/definitions/tab"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"groups": {
|
|
517
|
+
"type": "array",
|
|
518
|
+
"description": "Groups nested under this anchor.",
|
|
519
|
+
"items": {
|
|
520
|
+
"$ref": "#/definitions/group"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"pages": {
|
|
524
|
+
"type": "array",
|
|
525
|
+
"description": "Pages nested under this anchor.",
|
|
526
|
+
"items": {
|
|
527
|
+
"oneOf": [
|
|
528
|
+
{ "$ref": "#/definitions/page" },
|
|
529
|
+
{ "$ref": "#/definitions/separator" },
|
|
530
|
+
{ "$ref": "#/definitions/link" }
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"menu": {
|
|
535
|
+
"type": "array",
|
|
536
|
+
"description": "Menu items nested under this anchor.",
|
|
537
|
+
"items": {
|
|
538
|
+
"$ref": "#/definitions/menuItem"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"anchors": {
|
|
542
|
+
"type": "array",
|
|
543
|
+
"description": "Anchors nested under this anchor.",
|
|
544
|
+
"items": {
|
|
545
|
+
"$ref": "#/definitions/anchor"
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"dropdowns": {
|
|
549
|
+
"type": "array",
|
|
550
|
+
"description": "Dropdowns nested under this anchor.",
|
|
551
|
+
"items": {
|
|
552
|
+
"$ref": "#/definitions/dropdown"
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
"icon": {
|
|
556
|
+
"type": "string",
|
|
557
|
+
"description": "Icon identifier for the anchor."
|
|
558
|
+
},
|
|
559
|
+
"color": {
|
|
560
|
+
"type": "object",
|
|
561
|
+
"description": "Optional light/dark color hints for displaying this anchor.",
|
|
562
|
+
"properties": {
|
|
563
|
+
"light": {
|
|
564
|
+
"type": "string",
|
|
565
|
+
"description": "Color used in light mode (hex).",
|
|
566
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
567
|
+
},
|
|
568
|
+
"dark": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"description": "Color used in dark mode (hex).",
|
|
571
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
"required": ["light", "dark"],
|
|
575
|
+
"additionalProperties": false
|
|
576
|
+
},
|
|
577
|
+
"hidden": {
|
|
578
|
+
"type": "boolean",
|
|
579
|
+
"description": "Whether the anchor is hidden. Defaults to false.",
|
|
580
|
+
"default": false
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
"oneOf": [
|
|
584
|
+
{
|
|
585
|
+
"required": ["href"],
|
|
586
|
+
"not": {
|
|
587
|
+
"anyOf": [
|
|
588
|
+
{ "required": ["tabs"] },
|
|
589
|
+
{ "required": ["groups"] },
|
|
590
|
+
{ "required": ["pages"] },
|
|
591
|
+
{ "required": ["menu"] },
|
|
592
|
+
{ "required": ["anchors"] },
|
|
593
|
+
{ "required": ["dropdowns"] }
|
|
185
594
|
]
|
|
186
595
|
}
|
|
187
596
|
},
|
|
188
597
|
{
|
|
189
598
|
"not": { "required": ["href"] },
|
|
190
599
|
"anyOf": [
|
|
600
|
+
{ "required": ["tabs"] },
|
|
601
|
+
{ "required": ["groups"] },
|
|
191
602
|
{ "required": ["pages"] },
|
|
192
|
-
{ "required": ["
|
|
603
|
+
{ "required": ["menu"] },
|
|
604
|
+
{ "required": ["anchors"] },
|
|
605
|
+
{ "required": ["dropdowns"] }
|
|
193
606
|
]
|
|
194
607
|
}
|
|
608
|
+
],
|
|
609
|
+
"additionalProperties": false
|
|
610
|
+
},
|
|
611
|
+
"productNav": {
|
|
612
|
+
"type": "object",
|
|
613
|
+
"description": "Navigation definition for a product docs area.",
|
|
614
|
+
"required": ["product"],
|
|
615
|
+
"properties": {
|
|
616
|
+
"product": {
|
|
617
|
+
"type": "string",
|
|
618
|
+
"description": "Product label (used for route prefix derivation)."
|
|
619
|
+
},
|
|
620
|
+
"icon": {
|
|
621
|
+
"type": "string",
|
|
622
|
+
"description": "Icon identifier for the product."
|
|
623
|
+
},
|
|
624
|
+
"name": {
|
|
625
|
+
"type": "string",
|
|
626
|
+
"description": "Optional display name for the product."
|
|
627
|
+
},
|
|
628
|
+
"description": {
|
|
629
|
+
"type": "string",
|
|
630
|
+
"description": "Optional description for the product."
|
|
631
|
+
},
|
|
632
|
+
"hidden": {
|
|
633
|
+
"type": "boolean",
|
|
634
|
+
"description": "Whether this product is hidden from navigation. Defaults to false.",
|
|
635
|
+
"default": false
|
|
636
|
+
},
|
|
637
|
+
"href": {
|
|
638
|
+
"$ref": "#/definitions/href"
|
|
639
|
+
},
|
|
640
|
+
"color": {
|
|
641
|
+
"type": "object",
|
|
642
|
+
"description": "Optional light/dark color hints for this product.",
|
|
643
|
+
"properties": {
|
|
644
|
+
"light": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"description": "Color used in light mode (hex).",
|
|
647
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
648
|
+
},
|
|
649
|
+
"dark": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"description": "Color used in dark mode (hex).",
|
|
652
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
"required": ["light", "dark"],
|
|
656
|
+
"additionalProperties": false
|
|
657
|
+
},
|
|
658
|
+
"tabs": {
|
|
659
|
+
"type": "array",
|
|
660
|
+
"description": "Tabs within this product.",
|
|
661
|
+
"items": {
|
|
662
|
+
"$ref": "#/definitions/tab"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"dropdowns": {
|
|
666
|
+
"type": "array",
|
|
667
|
+
"description": "Dropdowns within this product.",
|
|
668
|
+
"items": {
|
|
669
|
+
"$ref": "#/definitions/dropdown"
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"groups": {
|
|
673
|
+
"type": "array",
|
|
674
|
+
"description": "Groups directly within this product.",
|
|
675
|
+
"items": {
|
|
676
|
+
"$ref": "#/definitions/group"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"pages": {
|
|
680
|
+
"type": "array",
|
|
681
|
+
"description": "Pages directly under this product when tabs are not needed.",
|
|
682
|
+
"items": {
|
|
683
|
+
"oneOf": [
|
|
684
|
+
{ "$ref": "#/definitions/page" },
|
|
685
|
+
{ "$ref": "#/definitions/separator" },
|
|
686
|
+
{ "$ref": "#/definitions/link" }
|
|
687
|
+
]
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
"menu": {
|
|
691
|
+
"type": "array",
|
|
692
|
+
"description": "Menu items directly within this product.",
|
|
693
|
+
"items": {
|
|
694
|
+
"$ref": "#/definitions/menuItem"
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
"anchors": {
|
|
698
|
+
"type": "array",
|
|
699
|
+
"description": "Anchors directly within this product.",
|
|
700
|
+
"items": {
|
|
701
|
+
"$ref": "#/definitions/anchor"
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
"additionalProperties": false,
|
|
706
|
+
"anyOf": [
|
|
707
|
+
{ "required": ["href"] },
|
|
708
|
+
{ "required": ["tabs"] },
|
|
709
|
+
{ "required": ["dropdowns"] },
|
|
710
|
+
{ "required": ["groups"] },
|
|
711
|
+
{ "required": ["pages"] },
|
|
712
|
+
{ "required": ["menu"] },
|
|
713
|
+
{ "required": ["anchors"] }
|
|
195
714
|
]
|
|
715
|
+
},
|
|
716
|
+
"versionNav": {
|
|
717
|
+
"type": "object",
|
|
718
|
+
"description": "Navigation definition for a specific docs version.",
|
|
719
|
+
"required": ["version"],
|
|
720
|
+
"properties": {
|
|
721
|
+
"version": {
|
|
722
|
+
"type": "string",
|
|
723
|
+
"description": "Version label (used for route prefix derivation)."
|
|
724
|
+
},
|
|
725
|
+
"default": {
|
|
726
|
+
"type": "boolean",
|
|
727
|
+
"description": "Whether this is the default version.",
|
|
728
|
+
"default": false
|
|
729
|
+
},
|
|
730
|
+
"hidden": {
|
|
731
|
+
"type": "boolean",
|
|
732
|
+
"description": "Whether this version is hidden from navigation. Defaults to false.",
|
|
733
|
+
"default": false
|
|
734
|
+
},
|
|
735
|
+
"href": {
|
|
736
|
+
"$ref": "#/definitions/href"
|
|
737
|
+
},
|
|
738
|
+
"tabs": {
|
|
739
|
+
"type": "array",
|
|
740
|
+
"description": "Tabs for this version.",
|
|
741
|
+
"items": {
|
|
742
|
+
"$ref": "#/definitions/tab"
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
"dropdowns": {
|
|
746
|
+
"type": "array",
|
|
747
|
+
"description": "Dropdowns for this version.",
|
|
748
|
+
"items": {
|
|
749
|
+
"$ref": "#/definitions/dropdown"
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
"groups": {
|
|
753
|
+
"type": "array",
|
|
754
|
+
"description": "Groups for this version.",
|
|
755
|
+
"items": {
|
|
756
|
+
"$ref": "#/definitions/group"
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
"pages": {
|
|
760
|
+
"type": "array",
|
|
761
|
+
"description": "Pages for this version.",
|
|
762
|
+
"items": {
|
|
763
|
+
"oneOf": [
|
|
764
|
+
{ "$ref": "#/definitions/page" },
|
|
765
|
+
{ "$ref": "#/definitions/separator" },
|
|
766
|
+
{ "$ref": "#/definitions/link" }
|
|
767
|
+
]
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
"menu": {
|
|
771
|
+
"type": "array",
|
|
772
|
+
"description": "Menu items for this version.",
|
|
773
|
+
"items": {
|
|
774
|
+
"$ref": "#/definitions/menuItem"
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
"anchors": {
|
|
778
|
+
"type": "array",
|
|
779
|
+
"description": "Anchors for this version.",
|
|
780
|
+
"items": {
|
|
781
|
+
"$ref": "#/definitions/anchor"
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"anyOf": [
|
|
786
|
+
{ "required": ["href"] },
|
|
787
|
+
{ "required": ["tabs"] },
|
|
788
|
+
{ "required": ["dropdowns"] },
|
|
789
|
+
{ "required": ["groups"] },
|
|
790
|
+
{ "required": ["pages"] },
|
|
791
|
+
{ "required": ["menu"] },
|
|
792
|
+
{ "required": ["anchors"] }
|
|
793
|
+
],
|
|
794
|
+
"additionalProperties": false
|
|
795
|
+
},
|
|
796
|
+
"globalTab": {
|
|
797
|
+
"type": "object",
|
|
798
|
+
"description": "Global external tab shown in the navbar across all pages.",
|
|
799
|
+
"required": ["tab", "href"],
|
|
800
|
+
"properties": {
|
|
801
|
+
"tab": {
|
|
802
|
+
"type": "string",
|
|
803
|
+
"description": "Display name for the global tab."
|
|
804
|
+
},
|
|
805
|
+
"href": {
|
|
806
|
+
"$ref": "#/definitions/href"
|
|
807
|
+
},
|
|
808
|
+
"icon": {
|
|
809
|
+
"type": "string",
|
|
810
|
+
"description": "Icon identifier for the global tab."
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
"additionalProperties": false
|
|
814
|
+
},
|
|
815
|
+
"languageNav": {
|
|
816
|
+
"type": "object",
|
|
817
|
+
"description": "Per-language navigation entry. Defines the full tab/group/page structure for one language.",
|
|
818
|
+
"required": ["language"],
|
|
819
|
+
"properties": {
|
|
820
|
+
"language": {
|
|
821
|
+
"type": "string",
|
|
822
|
+
"description": "BCP 47 language code (e.g. en, es, ja)."
|
|
823
|
+
},
|
|
824
|
+
"default": {
|
|
825
|
+
"type": "boolean",
|
|
826
|
+
"description": "Whether this is the default language.",
|
|
827
|
+
"default": false
|
|
828
|
+
},
|
|
829
|
+
"hidden": {
|
|
830
|
+
"type": "boolean",
|
|
831
|
+
"description": "Whether this language is hidden from navigation. Defaults to false.",
|
|
832
|
+
"default": false
|
|
833
|
+
},
|
|
834
|
+
"href": {
|
|
835
|
+
"$ref": "#/definitions/href"
|
|
836
|
+
},
|
|
837
|
+
"tabs": {
|
|
838
|
+
"type": "array",
|
|
839
|
+
"description": "Navigation tabs for this language.",
|
|
840
|
+
"items": {
|
|
841
|
+
"$ref": "#/definitions/tab"
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
"dropdowns": {
|
|
845
|
+
"type": "array",
|
|
846
|
+
"description": "Dropdowns for this language.",
|
|
847
|
+
"items": {
|
|
848
|
+
"$ref": "#/definitions/dropdown"
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
"groups": {
|
|
852
|
+
"type": "array",
|
|
853
|
+
"description": "Groups for this language.",
|
|
854
|
+
"items": {
|
|
855
|
+
"$ref": "#/definitions/group"
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
"pages": {
|
|
859
|
+
"type": "array",
|
|
860
|
+
"description": "Pages for this language.",
|
|
861
|
+
"items": {
|
|
862
|
+
"oneOf": [
|
|
863
|
+
{ "$ref": "#/definitions/page" },
|
|
864
|
+
{ "$ref": "#/definitions/separator" },
|
|
865
|
+
{ "$ref": "#/definitions/link" }
|
|
866
|
+
]
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"menu": {
|
|
870
|
+
"type": "array",
|
|
871
|
+
"description": "Menu items for this language.",
|
|
872
|
+
"items": {
|
|
873
|
+
"$ref": "#/definitions/menuItem"
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
"anchors": {
|
|
877
|
+
"type": "array",
|
|
878
|
+
"description": "Anchors for this language.",
|
|
879
|
+
"items": {
|
|
880
|
+
"$ref": "#/definitions/anchor"
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
"anyOf": [
|
|
885
|
+
{ "required": ["href"] },
|
|
886
|
+
{ "required": ["tabs"] },
|
|
887
|
+
{ "required": ["dropdowns"] },
|
|
888
|
+
{ "required": ["groups"] },
|
|
889
|
+
{ "required": ["pages"] },
|
|
890
|
+
{ "required": ["menu"] },
|
|
891
|
+
{ "required": ["anchors"] }
|
|
892
|
+
],
|
|
893
|
+
"additionalProperties": false
|
|
196
894
|
}
|
|
197
895
|
}
|
|
198
896
|
}
|