-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebars.ts
79 lines (77 loc) · 2.24 KB
/
sidebars.ts
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
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
sidebar: [
{
type: 'doc',
id: 'index',
label: 'Overview',
// className: 'docs overview',
},
{
type: 'category',
label: 'Getting Started',
link: { type: 'doc', id: 'getting-started/index' },
items: [
{
type: 'autogenerated',
dirName: 'getting-started',
},
],
// className: 'docs getting-started',
},
{
type: 'category',
label: 'How-To Guides',
link: { type: 'doc', id: 'how-to-guides/index' },
items: [{ type: 'autogenerated', dirName: 'how-to-guides' }],
// className: 'docs how-to-guides',
},
{
type: 'category',
label: 'Concepts',
link: { type: 'doc', id: 'concepts/index' },
items: [{ type: 'autogenerated', dirName: 'concepts' }],
// className: 'docs concepts',
},
{
type: 'category',
label: 'Reference',
link: { type: 'doc', id: 'reference/index' },
items: [
{
type: 'category',
label: 'API',
link: { type: 'doc', id: 'reference/api/index' },
// eslint-disable-next-line @typescript-eslint/no-var-requires
items: require('./docs/reference/api/sidebar.ts')
.filter(
(item) => item.type !== 'doc' || !item.id?.endsWith('-rest-api'),
)
.map((item) =>
item.items?.length
? {
...item,
items: item.items.filter(
(subItem) =>
subItem.type !== 'doc' ||
!subItem.id.includes('deprecated-'),
),
}
: item,
)
.sort((a, b) => (a.label ?? '').localeCompare(b.label ?? '')),
},
{ type: 'autogenerated', dirName: 'reference' },
],
// className: 'docs reference',
},
{
type: 'category',
label: 'Development',
link: { type: 'doc', id: 'development/index' },
items: [{ type: 'autogenerated', dirName: 'development' }],
// className: 'docs development',
},
],
};
export default sidebars;