Skip to content

Commit

Permalink
refactor: update sidebar structure and labels for documentation (#3436)
Browse files Browse the repository at this point in the history
* refactor: update sidebar structure and labels for documentation

* chore: bump version to 3.3.4 in package.json
  • Loading branch information
ethanshar authored Dec 5, 2024
1 parent 29d342f commit acf6c5e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
10 changes: 8 additions & 2 deletions docuilib/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ const darkCodeTheme = themes.dracula;
{
type: 'doc',
docId: 'getting-started/setup',
position: 'right',
label: 'Docs'
position: 'left',
label: 'Guides'
},
{
type: 'doc',
docId: 'components/basic/View',
position: 'left',
label: 'Components'
},
// {to: '/blog', label: 'Blog', position: 'left'},
{
Expand Down
2 changes: 1 addition & 1 deletion docuilib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uilib-docs",
"version": "3.3.3",
"version": "3.3.4",
"main": "./src/index.ts",
"scripts": {
"docusaurus": "docusaurus",
Expand Down
35 changes: 19 additions & 16 deletions docuilib/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ module.exports = {
// By default, Docusaurus generates a sidebar from the docs folder structure
// tutorialSidebar: [{type: 'autogenerated', dirName: '.'}]

// But you can create a sidebar manually
tutorialSidebar: [
guidesSidebar: [
{
type: 'category',
label: 'Getting Started',
Expand All @@ -54,25 +53,29 @@ module.exports = {
dirName: `foundation`
}
]
},
}
],
componentsSidebar: [
{
type: 'category',
label: 'Components',
collapsible: false,
// items: ['Basic', 'Lists', 'Form', 'Overlays', 'Layout', 'Keyboard', 'Incubator'].map(category => {
items: Object.keys(componentsCategories).sort().map(category => {
return {
type: 'category',
label: componentsCategories[category],
collapsed: true,
items: [
{
type: 'autogenerated',
dirName: `components/${category}`
}
]
};
})
items: Object.keys(componentsCategories)
.sort()
.map(category => {
return {
type: 'category',
label: componentsCategories[category],
collapsed: true,
items: [
{
type: 'autogenerated',
dirName: `components/${category}`
}
]
};
})
}
]
};

0 comments on commit acf6c5e

Please sign in to comment.