-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnavigation.ts
More file actions
140 lines (133 loc) · 3.99 KB
/
Copy pathnavigation.ts
File metadata and controls
140 lines (133 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/**
* Single source of truth for documentation sidebar and site footer links.
* Update this file in the same PR when adding or removing doc pages.
*/
export type NavItem = {
title: string;
slug: string;
children?: NavItem[];
};
export type NavSection = {
title: string;
items: NavItem[];
};
export const docsNav: NavSection[] = [
{
title: "Getting Started",
items: [
{ title: "Overview", slug: "" },
{ title: "Installation", slug: "getting-started/installation" },
{ title: "Upgrading", slug: "getting-started/upgrading" },
],
},
{
title: "Advanced",
items: [
{ title: "Environment", slug: "advanced/environment" },
{ title: "Troubleshooting", slug: "advanced/troubleshooting" },
],
},
{
title: "Reference",
items: [
{ title: "Configuration", slug: "reference/configuration" },
{ title: "Commands", slug: "reference/commands" },
{ title: "Installer", slug: "reference/installer" },
],
},
{
title: "Development",
items: [
{ title: "Building", slug: "development/building" },
{ title: "Architecture", slug: "development/architecture" },
{ title: "Components", slug: "development/components" },
{ title: "Coding Standards", slug: "development/coding-standards" },
{ title: "Release Process", slug: "development/release-process" },
{ title: "Testing", slug: "development/testing" },
{
title: "Architecture Decisions",
slug: "development/adr",
children: [
{ title: "ADR Index", slug: "development/adr" },
{ title: "001 - Use Tauri", slug: "development/adr/001-use-tauri" },
{
title: "002 - Tailwind + shadcn",
slug: "development/adr/002-use-tailwind-shadcn",
},
{ title: "003 - No Redux", slug: "development/adr/003-no-redux" },
{
title: "004 - Polling over events",
slug: "development/adr/004-polling-over-events",
},
{
title: "005 - PHP-first scope",
slug: "development/adr/005-php-first-scope",
},
{
title: "006 - App/data separation",
slug: "development/adr/006-app-data-separation",
},
],
},
],
},
{
title: "Project",
items: [
{ title: "Roadmap", slug: "roadmap" },
{ title: "Feature Status", slug: "feature-status" },
{ title: "FAQ", slug: "faq" },
],
},
];
export const siteHeaderNav = [
{ label: "Download", href: "/download" },
{ label: "Docs", href: "/docs" },
{ label: "Releases", href: "/releases" },
{ label: "Community", href: "/community" },
] as const;
export const siteFooterNav = {
documentation: [
{ label: "Documentation", href: "/docs" },
{ label: "Download", href: "/download" },
{ label: "Releases", href: "/releases" },
{ label: "Roadmap", href: "/docs/roadmap" },
{ label: "Changelog", href: "/changelog" },
{ label: "FAQ", href: "/docs/faq" },
],
community: [
{
label: "GitHub",
href: "https://github.com/DevStackBox/DevStackBox",
external: true,
},
{
label: "Contributing",
href: "https://github.com/DevStackBox/DevStackBox/blob/main/CONTRIBUTING.md",
external: true,
},
{ label: "Code of Conduct", href: "/community#code-of-conduct" },
],
legal: [
{ label: "License", href: "/license" },
{ label: "Privacy", href: "/privacy" },
{ label: "Security", href: "/security" },
],
} as const;
/** Flat ordered list of doc slugs for prev/next navigation and orphan checks. */
export function flattenDocSlugs(sections: NavSection[] = docsNav): string[] {
const slugs: string[] = [];
for (const section of sections) {
for (const item of section.items) {
if (item.children) {
for (const child of item.children) {
slugs.push(child.slug);
}
} else {
slugs.push(item.slug);
}
}
}
return slugs;
}
export const allDocSlugs = flattenDocSlugs();