Skip to content

Commit

Permalink
fix(theme): don't show sidebar on home layout (#825) (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Jun 21, 2022
1 parent 9bc4330 commit 42cbd31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/theme-default/composables/sidebar.ts
Expand Up @@ -16,7 +16,11 @@ export function useSidebar() {
})

const hasSidebar = computed(() => {
return frontmatter.value.sidebar !== false && sidebar.value.length > 0
return (
frontmatter.value.sidebar !== false &&
sidebar.value.length > 0 &&
frontmatter.value.layout !== 'home'
)
})

function open() {
Expand Down

0 comments on commit 42cbd31

Please sign in to comment.