Skip to content

Commit

Permalink
feat: category sidebars
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Jun 26, 2024
1 parent 386a96b commit efa0229
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,18 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};
const sidebars: SidebarsConfig = [
"quick-start",
"learn",
"docs",
"tools",
"resources",
].reduce((acc, cur) => {
return {
...acc,
[cur]: [{ type: "autogenerated", dirName: cur }],
};
}, {} as SidebarsConfig);

export default sidebars;

0 comments on commit efa0229

Please sign in to comment.