-
Notifications
You must be signed in to change notification settings - Fork 12
/
sidebars.js
68 lines (60 loc) · 1.15 KB
/
sidebars.js
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
const fs = require('fs')
const { isAbsolute } = require('path')
const mapFiles = (root,type) => {
return fs.readdirSync(`./docs/${root}/${type}`)
.filter( f => f.endsWith('.md') || f.endsWith('.mdx'))
.map( f => f.replace('.mdx','').replace('.md', '') )
.map( f => {
const parts = f.split('-')
if (Number.isInteger(parseInt(parts[0],10))) {
parts.shift()
return parts.join('-')
}
return f
})
.map( f => `${root}/${type}/${f}`)
}
const gettingstarted = [
{
type: 'autogenerated',
dirName: 'getting-started',
},
]
const firmware = [
{
type: 'autogenerated',
dirName: 'firmware',
},
]
const devicemanagement = [
{
type: 'autogenerated',
dirName: 'device-management',
},
]
const datamanagement = [
{
type: 'autogenerated',
dirName: 'data-routing',
},
]
const applicationservices = [
{
type: 'autogenerated',
dirName: 'application-services',
},
]
const reference = [
{
type: 'autogenerated',
dirName: 'reference',
},
]
module.exports = {
gettingstarted,
firmware,
devicemanagement,
datamanagement,
applicationservices,
reference,
};