Extending @vuepress/theme-default Layout.vue causes the Sidebar to disappear #1045
Closed
1 task done
Labels
type: bug
Something isn't working
Bug report
Version
vuepress 1.0.0-alpha.24
Steps to reproduce
@vuepress/theme-default/layouts/Layout.vue
CustomLayout.vue
index.md
What is expected?
Default layout to appear as expected
What is actually happening?
The sidebar is always hidden.
I believe this is to do with the following function:
vuepress/packages/@vuepress/theme-default/layouts/Layout.vue
Lines 93 to 101 in ace3aec
Checking for
!frontmatter.layout
causes the sidebar to always be hidden if you inherit the default Layout.vue in this way.It's possible to get around the issue by redefining
shouldShowSidebar()
in the inherited component, but I'm wondering whether there should even be a check for!frontmatter.layout
anyway, seeing as LayoutDistributor.vue will replace the whole component iffrontmatter.layout
is defined.Other relevant information
The text was updated successfully, but these errors were encountered: