feat(theme-classic, plugin-docs): sidebar item level-specific className + allow customization (#5642)

* Initial work

* Complete function

* Avoid duplication

* More dedupe

* Make everything constants

* Change casing & docs
This commit is contained in:
Joshua Chen 2021-10-07 22:59:02 +08:00 committed by GitHub
parent f6ec757aa0
commit eaacb0e98a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 79 additions and 11 deletions

View file

@ -10,6 +10,7 @@ module.exports = {
{
type: 'doc',
id: 'index',
className: 'red',
label: 'Index',
},
{
@ -23,9 +24,16 @@ module.exports = {
label: 'Huge sidebar category',
items: generateHugeSidebarItems(4),
},
{
type: 'link',
label: 'External link',
href: 'https://github.com/facebook/docusaurus',
className: 'red',
},
{
type: 'category',
label: 'TOC tests',
className: 'red',
items: [
{
type: 'autogenerated',