-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sidebar: 'auto' doesn't create sidebar #178
Comments
Sidebar object is required.Check out https://github.com/vuejs/vitepress/blob/master/docs/.vitepress/config |
Yap this is bug. Sidebar is actually mounted, but it's hidden because at layout component it treats it as hidden. const showSidebar = computed(() => {
const { frontmatter } = route.data
const { themeConfig } = siteRouteData.value
return (
!frontmatter.home &&
frontmatter.sidebar !== false &&
((typeof themeConfig.sidebar === 'object' &&
Object.keys(themeConfig.sidebar).length != 0) ||
(Array.isArray(themeConfig.sidebar) && themeConfig.sidebar.length != 0))
)
}) So fixing this code, should correctly show the auto sidebar 🔥 |
Has this been removed later on? I got a sidebar: {
'XXX': 'auto',
} |
Describe the bug
Using sidebar auto doesn't produce sidebar at all, even it is considered to be a valid option in https://github.com/vuejs/vitepress/blob/master/src/client/theme-default/config.ts.
To Reproduce
Expected behavior
A sidebar should be auto generated using the headings provided in the markdown files
System Info
The text was updated successfully, but these errors were encountered: