From 98e45668db555a8e0a09fca21d9d92aeb24a4d1c Mon Sep 17 00:00:00 2001 From: Christian Georgi Date: Thu, 10 Aug 2023 11:44:55 +0200 Subject: [PATCH] Fix double base in URL Changed since Vitepress rc.4 --- .vitepress/theme/components/indexFilter.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.vitepress/theme/components/indexFilter.js b/.vitepress/theme/components/indexFilter.js index 812fceb38..87cd988f3 100644 --- a/.vitepress/theme/components/indexFilter.js +++ b/.vitepress/theme/components/indexFilter.js @@ -1,5 +1,4 @@ -const { base, themeConfig: { sidebar }} = global.VITEPRESS_CONFIG.site -import { join } from 'node:path' +const { themeConfig: { sidebar }} = global.VITEPRESS_CONFIG.site export default (pages, basePath) => { let items = findInItems(basePath, sidebar) || [] @@ -20,7 +19,7 @@ export default (pages, basePath) => { .map(p => { // this data is inlined in each index page, so sparsely construct the final object return { - url : join(base, p.url), + url: p.url, title: p.title, frontmatter: { synopsis: p.frontmatter.synopsis