vitepress
vitepress copied to clipboard
Enable SidebarItem only menu in sidebar
Is your feature request related to a problem? Please describe.
Chart.js has a mix of expandable groups and individual items within its sidebar. I can't migrate the docs from Vuepress to Vitepress because Vitepress will not allow individual items within the sidebar
Describe the solution you'd like
The types are currently:
export type Sidebar = SidebarGroup[] | SidebarMulti
export interface SidebarMulti {
[path: string]: SidebarGroup[]
}
It would be nice to change them to:
export type Sidebar = Array<SidebarGroup|SidebarItem> | SidebarMulti
export interface SidebarMulti {
[path: string]: Array<SidebarGroup|SidebarItem>
}
Describe alternatives you've considered
Make a group with just an individual item in it. It's kind of an annoying user experience though
Additional context
The work-in-progress branch is here: https://github.com/benmccann/Chart.js/tree/vitepress
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Read the Contributing Guidelines.
- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
This config is tied to Default Theme. If Default Theme does not support this type of structure, it shouldn't have it. If you need custom type, that means you should create your own config types 👍
If VitePress default theme gets support for this type of sidebar structure, then it will be modified as you mentioned. And actually this feature is planned.
Given that the feature is planned, maybe it'd make sense to leave this open to track it? It'd be easier for folks who are interested to subscribe to this thread and be notified when it's closed than having to come back on a frequent basis to check the release notes to see whether it's been implemented
Make sense. I'll adjust the title then 👍
It's supported now. Support for this was added some time in the last year IG.