mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 08:27:03 +02:00
feat(v2): expanded sidebar categories by default (#2682)
* feat: update sidebar categ to take collapsed prop * feat: add extra sidebars collapsed test * fix: only mutate item.collapsed if necessary * feat: update docs for SidebarItemCategory * fix: update snapshots * fix: update json to match new sidebar schema * fix: update last snapshot * refactor: check if item should be expanded * docs: update sidebar categories section * refactor: use new collpased on docusaurus * feat: only highlight category for active page * fix: check for window * refactor: use ExecutionEnviornment * refactor: make isCategoryOfActivePage pure * fix: rename docs to docs-introduction in sidebars * Update docs.md * misc: remove setting for every sidebar Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
This commit is contained in:
parent
d8ebe8b2e4
commit
07b9e9cd62
12 changed files with 273 additions and 26 deletions
|
@ -6,30 +6,51 @@
|
|||
*/
|
||||
|
||||
module.exports = {
|
||||
docs: {
|
||||
Docusaurus: ['introduction', 'design-principles', 'contributing'],
|
||||
'Getting Started': ['installation', 'configuration'],
|
||||
Guides: [
|
||||
'creating-pages',
|
||||
'styling-layout',
|
||||
'static-assets',
|
||||
{
|
||||
Docs: ['docs-introduction', 'markdown-features', 'versioning'],
|
||||
},
|
||||
'blog',
|
||||
'search',
|
||||
'deployment',
|
||||
'migrating-from-v1-to-v2',
|
||||
],
|
||||
'Advanced Guides': ['using-plugins', 'using-themes', 'presets'],
|
||||
'API Reference': [
|
||||
'cli',
|
||||
'docusaurus-core',
|
||||
'docusaurus.config.js',
|
||||
'lifecycle-apis',
|
||||
'theme-classic',
|
||||
],
|
||||
},
|
||||
docs: [
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Docusaurus',
|
||||
items: ['introduction', 'design-principles', 'contributing'],
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Getting Started',
|
||||
collapsed: false,
|
||||
items: ['installation', 'configuration'],
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Guides',
|
||||
items: [
|
||||
'creating-pages',
|
||||
'styling-layout',
|
||||
'static-assets',
|
||||
{
|
||||
Docs: ['docs-introduction', 'markdown-features', 'versioning'],
|
||||
},
|
||||
'blog',
|
||||
'search',
|
||||
'deployment',
|
||||
'migrating-from-v1-to-v2',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Advanced Guides',
|
||||
items: ['using-plugins', 'using-themes', 'presets'],
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: 'API Reference',
|
||||
items: [
|
||||
'cli',
|
||||
'docusaurus-core',
|
||||
'docusaurus.config.js',
|
||||
'lifecycle-apis',
|
||||
'theme-classic',
|
||||
],
|
||||
},
|
||||
],
|
||||
community: [
|
||||
'support',
|
||||
'team',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue