diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 8b73fb0be..04326b833 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -98,6 +98,12 @@ export default defineConfig({ replacement: fileURLToPath( new URL('./theme/components/ThemeDropdown.vue', import.meta.url) ) + }, + { + find: /^.*VPLocalSearchBox\.vue$/, + replacement: fileURLToPath( + new URL('./theme/components/VPLocalSearchBox.vue', import.meta.url) + ) } ] }, diff --git a/docs/.vitepress/constants.ts b/docs/.vitepress/constants.ts index fb22ca7fb..108d4359d 100644 --- a/docs/.vitepress/constants.ts +++ b/docs/.vitepress/constants.ts @@ -121,7 +121,7 @@ export const search: DefaultTheme.Config['search'] = { }, searchOptions: { combineWith: 'AND', - fuzzy: true, + fuzzy: false, // @ts-ignore boostDocument: (documentId, term, storedFields: Record) => { const titles = (storedFields?.titles as string[]) diff --git a/docs/.vitepress/theme/components/VPLocalSearchBox.vue b/docs/.vitepress/theme/components/VPLocalSearchBox.vue new file mode 100644 index 000000000..94ec1709b --- /dev/null +++ b/docs/.vitepress/theme/components/VPLocalSearchBox.vue @@ -0,0 +1,923 @@ + + + + + diff --git a/package.json b/package.json index eb8e4f4fc..43cad16ef 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,12 @@ "@headlessui/vue": "^1.7.23", "@resvg/resvg-js": "^2.6.2", "@vueuse/core": "^14.1.0", + "@vueuse/integrations": "^14.1.0", "consola": "^3.4.2", "feed": "^5.1.0", "itty-fetcher": "^1.0.10", + "mark.js": "^8.11.1", + "minisearch": "^7.2.0", "nitro-cors": "^0.7.1", "nitropack": "^2.12.9", "nprogress": "^0.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d479c575..868915f9c 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ