forked from centrica-engineering/nucleus-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebars.js
62 lines (55 loc) · 1.58 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
const fs = require('fs');
const path = require('path');
const docsPath = './docs';
const aToZ = (dir) => {
let dirFiles = [];
let dirPath = path.join(docsPath, dir);
fs.readdirSync(dirPath).forEach(file => {
dirFiles.push(`${dir}/${path.parse(file).name}`);
});
return dirFiles
}
// All of the above is because docusaurus can't auto generate the sidebar from a directory
// See: https://github.com/facebook/docusaurus/issues/3464
module.exports = {
someSidebar: {
'Getting Started': [
'getting-started/introduction',
'getting-started/principles',
'getting-started/accessibility',
'getting-started/working-with-nucleus',
'getting-started/our-process',
'getting-started/brand',
'getting-started/design-tokens'
],
'Foundations': [
'foundations/names-of-things',
'foundations/typography',
'foundations/lists',
'foundations/colours',
'foundations/modular-scale',
'foundations/viewports',
'foundations/structure',
'foundations/photography',
'foundations/icons',
'foundations/illustrations'
],
'Components': aToZ('components'),
'Patterns': [
'patterns/journeys',
'patterns/asking-for-information',
'patterns/experiences',
'patterns/loading',
'patterns/messaging',
'patterns/telephone-numbers'
],
'Page types': aToZ('page-types'),
'Community': [
'community/contribute-to-nucleus',
'community/vanilla-first',
'community/contribute-to-documentation',
'community/events',
'community/releases'
],
}
};