@@ -269,46 +269,123 @@ gravitykit.dev/
269269
270270### repos-config.json
271271
272- Central configuration file mapping products to GitHub repositories:
272+ Central configuration file mapping products to GitHub repositories. This file controls repository cloning, documentation generation, and navigation structure.
273+
274+ #### Schema Overview
273275
274276``` json
275277{
278+ "$schema" : " ./repos-config.schema.json" ,
276279 "reposDir" : " ./repos" ,
277280 "outputDir" : " ./docs" ,
278281 "defaults" : {
279282 "branch" : " develop" ,
280283 "ignoreFiles" : [" **/vendor/**" , " **/node_modules/**" ],
281- "ignoreHooks" : [" deprecated_*" , " private_*" ]
284+ "ignoreHooks" : [" deprecated_*" , " private_*" ],
285+ "customFields" : {
286+ "since" : true ,
287+ "deprecated" : true ,
288+ "internal" : false ,
289+ "example" : true
290+ }
291+ },
292+ "categories" : {
293+ "gravityview" : {
294+ "label" : " GravityView" ,
295+ "position" : 1
296+ },
297+ "gravityview-extensions" : {
298+ "label" : " Extensions" ,
299+ "parent" : " gravityview" ,
300+ "position" : 2
301+ }
282302 },
283303 "products" : [
284304 {
285305 "id" : " gravityview" ,
286306 "repo" : " GravityKit/GravityView" ,
287307 "label" : " GravityView" ,
288- "routeBasePath" : " docs/gravityview"
308+ "category" : " gravityview" ,
309+ "purchaseUrl" : " https://www.gravitykit.com/products/gravityview/"
289310 }
290311 ]
291312}
292313```
293314
315+ #### Top-Level Fields
316+
317+ | Field | Type | Description |
318+ | -------| ------| -------------|
319+ | ` reposDir ` | string | Directory where repos are cloned (default: ` ./repos ` ) |
320+ | ` outputDir ` | string | Directory for generated documentation (default: ` ./docs ` ) |
321+ | ` defaults ` | object | Default settings applied to all products |
322+ | ` categories ` | object | Navigation groupings for the site navbar |
323+ | ` products ` | array | List of product configurations |
324+
325+ #### Categories
326+
327+ Categories control how products are grouped in the site navigation. Each category can have:
328+
329+ | Field | Type | Description |
330+ | -------| ------| -------------|
331+ | ` label ` | string | Display name in navigation |
332+ | ` parent ` | string | Parent category ID (for nested dropdowns) |
333+ | ` position ` | number | Sort order in navigation |
334+
335+ ** Current category structure:**
336+ - ` gravityview ` - Main GravityView dropdown
337+ - ` gravityview-extensions ` - Extensions submenu
338+ - ` gravityview-layouts ` - Layouts submenu
339+ - ` gravitykit ` - GravityKit Products dropdown
340+ - ` gravity-forms ` - Gravity Forms Add-Ons dropdown
341+
342+ #### Product Fields
343+
344+ | Field | Type | Required | Description |
345+ | -------| ------| ----------| -------------|
346+ | ` id ` | string | Yes | Unique identifier, used in URLs (e.g., ` gravityview ` ) |
347+ | ` repo ` | string | Yes | GitHub repository path (e.g., ` GravityKit/GravityView ` ) |
348+ | ` label ` | string | Yes | Display name (e.g., ` GravityView ` ) |
349+ | ` category ` | string | Yes | Category ID for navigation grouping |
350+ | ` purchaseUrl ` | string | No | URL to product purchase page |
351+ | ` isFree ` | boolean | No | Set to ` true ` for free products |
352+ | ` branch ` | string | No | Override default branch |
353+ | ` ignoreFiles ` | array | No | Additional glob patterns to ignore |
354+ | ` ignoreHooks ` | array | No | Additional hook patterns to ignore |
355+
294356### Adding a New Product
295357
296- 1 . Add an entry to ` repos-config.json ` :
358+ 1 . Add an entry to ` repos-config.json ` under ` products ` :
297359
298360``` json
299361{
300362 "id" : " new-product" ,
301363 "repo" : " GravityKit/NewProduct" ,
302364 "label" : " New Product Name" ,
303- "routeBasePath" : " docs/new-product"
365+ "category" : " gravitykit" ,
366+ "purchaseUrl" : " https://www.gravitykit.com/products/new-product/"
367+ }
368+ ```
369+
370+ 2 . If needed, add a new category:
371+
372+ ``` json
373+ {
374+ "categories" : {
375+ "new-category" : {
376+ "label" : " New Category" ,
377+ "position" : 4
378+ }
379+ }
304380}
305381```
306382
307- 2 . Regenerate documentation:
383+ 3 . Regenerate documentation:
308384
309385``` bash
310386npm run repos:clone -- --product new-product
311387npm run hooks:generate -- --product new-product
388+ npm run api:generate -- --filter new-product
312389```
313390
314391## Deployment
0 commit comments