diff --git a/src/client/theme-default/components/VPAlgoliaSearchBox.vue b/src/client/theme-default/components/VPAlgoliaSearchBox.vue index b50f9ff6..04652295 100644 --- a/src/client/theme-default/components/VPAlgoliaSearchBox.vue +++ b/src/client/theme-default/components/VPAlgoliaSearchBox.vue @@ -84,8 +84,8 @@ function initialize(userOptions: DefaultTheme.AlgoliaSearchOptions) { docsearch(options) } -function getRelativePath(absoluteUrl: string) { - const { pathname, hash } = new URL(absoluteUrl) +function getRelativePath(url: string) { + const { pathname, hash } = new URL(url, location.origin) return ( pathname.replace( /\.html$/,