-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsidebars.ts
More file actions
38 lines (33 loc) · 1.01 KB
/
sidebars.ts
File metadata and controls
38 lines (33 loc) · 1.01 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
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
// 使用 require 来导入 JavaScript 模块
const { generateSidebarWithIntroductions } = require('./scripts/generate-sidebar');
const docsDir = './docs';
const sidebars: SidebarsConfig = {
tutorialSidebar: [
{
type: 'doc',
id: 'intro',
},
// {
// type: 'category',
// label: 'Devices',
// collapsed:false,
// items: generateSidebarWithIntroductions(docsDir, 'devices'),
// },
...generateSidebarWithIntroductions(docsDir, 'devices'),
],
snapemuSidebar: [
{
type: 'doc',
id: 'platforms',
},
// {
// type: 'category',
// label: 'Platform',
// collapsed:false,
// items: generateSidebarWithIntroductions(docsDir, 'platform'),
// },
...generateSidebarWithIntroductions(docsDir, 'platform')
],
};
export default sidebars;