From b00b277afd95ef78dad3320c7c1ef3920d42e9d0 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Wed, 27 Nov 2019 17:13:15 +0800 Subject: [PATCH] fix($theme-default): wrong algolia search route with base config (#2007) --- .../@vuepress/theme-default/components/AlgoliaSearchBox.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue b/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue index 92818a125c..2c981e6db6 100644 --- a/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue +++ b/packages/@vuepress/theme-default/components/AlgoliaSearchBox.vue @@ -46,7 +46,8 @@ export default { }, algoliaOptions), handleSelected: (input, event, suggestion) => { const { pathname, hash } = new URL(suggestion.url) - this.$router.push(`${pathname}${hash}`) + const routepath = pathname.replace(this.$site.base, '/') + this.$router.push(`${routepath}${hash}`) } } ))