From 42cbd31327b789ff9525919afb39b3092f1d445b Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:09:12 +0530 Subject: [PATCH] fix(theme): don't show sidebar on home layout (#825) (#829) --- src/client/theme-default/composables/sidebar.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/theme-default/composables/sidebar.ts b/src/client/theme-default/composables/sidebar.ts index dae2a6ab5c6d..40f725c88b49 100644 --- a/src/client/theme-default/composables/sidebar.ts +++ b/src/client/theme-default/composables/sidebar.ts @@ -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() {