Skip to content

Commit c26db48

Browse files
committed
Refactor manifest state to use consistent arrays
Switch the `state` property in documentation manifest entries from single strings to arrays across all relevant fields for consistency. This aligns the JSON structure, allowing multiple states to be clearly defined when necessary and ensures future flexibility in state assignments.
1 parent 6610084 commit c26db48

File tree

2 files changed

+18
-53
lines changed

2 files changed

+18
-53
lines changed

docs/manifest.json

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"versions": [
3-
"main"
4-
],
2+
"versions": ["main"],
53
"routes": [
64
{
75
"title": "About",
@@ -284,10 +282,7 @@
284282
"title": "Process Logging",
285283
"description": "Audit commands in workspaces with exectrace",
286284
"path": "./templates/process-logging.md",
287-
"state": [
288-
"enterprise",
289-
"premium"
290-
]
285+
"state": ["enterprise", "premium"]
291286
},
292287
{
293288
"title": "Icons",
@@ -398,30 +393,21 @@
398393
"description": "Learn how to manage user groups",
399394
"path": "./admin/groups.md",
400395
"icon_path": "./images/icons/group.svg",
401-
"state": [
402-
"enterprise",
403-
"premium"
404-
]
396+
"state": ["enterprise", "premium"]
405397
},
406398
{
407399
"title": "Organizations",
408400
"description": "Learn how to manage organizations",
409401
"path": "./admin/organizations.md",
410402
"icon_path": "./images/icons/orgs.svg",
411-
"state": [
412-
"enterprise",
413-
"premium"
414-
]
403+
"state": ["enterprise", "premium"]
415404
},
416405
{
417406
"title": "Template RBAC",
418407
"description": "Learn how to use the role based access control against templates",
419408
"path": "./admin/rbac.md",
420409
"icon_path": "./images/icons/rbac.svg",
421-
"state": [
422-
"enterprise",
423-
"beta"
424-
]
410+
"state": ["enterprise", "beta"]
425411
},
426412
{
427413
"title": "Configuration",
@@ -464,20 +450,14 @@
464450
"description": "Run provisioners isolated from the Coder server",
465451
"path": "./admin/provisioners.md",
466452
"icon_path": "./images/icons/queue.svg",
467-
"state": [
468-
"enterprise",
469-
"premium"
470-
]
453+
"state": ["enterprise", "premium"]
471454
},
472455
{
473456
"title": "Workspace Proxies",
474457
"description": "Run geo distributed workspace proxies",
475458
"path": "./admin/workspace-proxies.md",
476459
"icon_path": "./images/icons/networking.svg",
477-
"state": [
478-
"enterprise",
479-
"premium"
480-
]
460+
"state": ["enterprise", "premium"]
481461
},
482462
{
483463
"title": "Application Logs",
@@ -490,30 +470,21 @@
490470
"description": "Learn how to use Audit Logs in your Coder deployment",
491471
"path": "./admin/audit-logs.md",
492472
"icon_path": "./images/icons/radar.svg",
493-
"state": [
494-
"enterprise",
495-
"premium"
496-
]
473+
"state": ["enterprise", "premium"]
497474
},
498475
{
499476
"title": "Quotas",
500477
"description": "Learn how to use Workspace Quotas in Coder",
501478
"path": "./admin/quotas.md",
502479
"icon_path": "./images/icons/dollar.svg",
503-
"state": [
504-
"enterprise",
505-
"premium"
506-
]
480+
"state": ["enterprise", "premium"]
507481
},
508482
{
509483
"title": "High Availability",
510484
"description": "Learn how to configure Coder for High Availability",
511485
"path": "./admin/high-availability.md",
512486
"icon_path": "./images/icons/hydra.svg",
513-
"state": [
514-
"enterprise",
515-
"premium"
516-
]
487+
"state": ["enterprise", "premium"]
517488
},
518489
{
519490
"title": "Prometheus",
@@ -526,10 +497,7 @@
526497
"description": "Learn how to configure the appearance of Coder",
527498
"path": "./admin/appearance.md",
528499
"icon_path": "./images/icons/info.svg",
529-
"state": [
530-
"enterprise",
531-
"premium"
532-
]
500+
"state": ["enterprise", "premium"]
533501
},
534502
{
535503
"title": "Telemetry",
@@ -542,10 +510,7 @@
542510
"description": "Learn how to encrypt sensitive data at rest in Coder",
543511
"path": "./admin/encryption.md",
544512
"icon_path": "./images/icons/lock.svg",
545-
"state": [
546-
"enterprise",
547-
"premium"
548-
]
513+
"state": ["enterprise", "premium"]
549514
},
550515
{
551516
"title": "Deployment Health",
@@ -563,13 +528,13 @@
563528
"title": "Slack Notifications",
564529
"description": "Learn how to setup Slack notifications",
565530
"path": "./admin/notifications/slack.md",
566-
"state": "beta"
531+
"state": ["beta"]
567532
},
568533
{
569534
"title": "Microsoft Teams Notifications",
570535
"description": "Learn how to setup Microsoft Teams notifications",
571536
"path": "./admin/notifications/teams.md",
572-
"state": "beta"
537+
"state": ["beta"]
573538
}
574539
]
575540
}

scripts/clidocgen/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import (
1616
type route struct {
1717
Title string `json:"title,omitempty"`
1818
Description string `json:"description,omitempty"`
19-
Path string `json:"path,omitempty"`
20-
IconPath string `json:"icon_path,omitempty"`
21-
State string `json:"state,omitempty"`
22-
Children []route `json:"children,omitempty"`
19+
Path string `json:"path,omitempty"`
20+
IconPath string `json:"icon_path,omitempty"`
21+
State []string `json:"state,omitempty"` // Changed to []string to support an array of states
22+
Children []route `json:"children,omitempty"`
2323
}
2424

2525
// manifest describes the entire documentation index.

0 commit comments

Comments
 (0)