Skip to content

Commit acf6c5e

Browse files
authored
refactor: update sidebar structure and labels for documentation (#3436)
* refactor: update sidebar structure and labels for documentation * chore: bump version to 3.3.4 in package.json
1 parent 29d342f commit acf6c5e

File tree

3 files changed

+28
-19
lines changed

3 files changed

+28
-19
lines changed

docuilib/docusaurus.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,14 @@ const darkCodeTheme = themes.dracula;
9292
{
9393
type: 'doc',
9494
docId: 'getting-started/setup',
95-
position: 'right',
96-
label: 'Docs'
95+
position: 'left',
96+
label: 'Guides'
97+
},
98+
{
99+
type: 'doc',
100+
docId: 'components/basic/View',
101+
position: 'left',
102+
label: 'Components'
97103
},
98104
// {to: '/blog', label: 'Blog', position: 'left'},
99105
{

docuilib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uilib-docs",
3-
"version": "3.3.3",
3+
"version": "3.3.4",
44
"main": "./src/index.ts",
55
"scripts": {
66
"docusaurus": "docusaurus",

docuilib/sidebars.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ module.exports = {
3131
// By default, Docusaurus generates a sidebar from the docs folder structure
3232
// tutorialSidebar: [{type: 'autogenerated', dirName: '.'}]
3333

34-
// But you can create a sidebar manually
35-
tutorialSidebar: [
34+
guidesSidebar: [
3635
{
3736
type: 'category',
3837
label: 'Getting Started',
@@ -54,25 +53,29 @@ module.exports = {
5453
dirName: `foundation`
5554
}
5655
]
57-
},
56+
}
57+
],
58+
componentsSidebar: [
5859
{
5960
type: 'category',
6061
label: 'Components',
6162
collapsible: false,
6263
// items: ['Basic', 'Lists', 'Form', 'Overlays', 'Layout', 'Keyboard', 'Incubator'].map(category => {
63-
items: Object.keys(componentsCategories).sort().map(category => {
64-
return {
65-
type: 'category',
66-
label: componentsCategories[category],
67-
collapsed: true,
68-
items: [
69-
{
70-
type: 'autogenerated',
71-
dirName: `components/${category}`
72-
}
73-
]
74-
};
75-
})
64+
items: Object.keys(componentsCategories)
65+
.sort()
66+
.map(category => {
67+
return {
68+
type: 'category',
69+
label: componentsCategories[category],
70+
collapsed: true,
71+
items: [
72+
{
73+
type: 'autogenerated',
74+
dirName: `components/${category}`
75+
}
76+
]
77+
};
78+
})
7679
}
7780
]
7881
};

0 commit comments

Comments
 (0)