From c046905b032a765352ff6bb9944f72db76c5cf45 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 21 Jun 2021 12:07:18 +0200 Subject: [PATCH] fix(search): correctly detect multilang Close #316 --- src/client/theme-default/Layout.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/theme-default/Layout.vue b/src/client/theme-default/Layout.vue index f7a18584..c7803adc 100644 --- a/src/client/theme-default/Layout.vue +++ b/src/client/theme-default/Layout.vue @@ -31,6 +31,11 @@ const isCustomLayout = computed(() => !!frontmatter.value.customLayout) // home const enableHome = computed(() => !!frontmatter.value.home) +// automatic multilang check for AlgoliaSearchBox +const isMultiLang = computed( + () => Object.keys(theme.value.locales || {}).length > 0 +) + // navbar const showNavbar = computed(() => { const themeConfig = theme.value @@ -85,7 +90,7 @@ const pageClasses = computed(() => {