Skip to content

Commit decb52a

Browse files
authored
docs: use local search (#22130)
1 parent dc60aae commit decb52a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/.vitepress/config.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,18 @@ const config = defineConfig({
160160
],
161161

162162
search: {
163-
provider: 'algolia',
163+
provider: 'local',
164164
options: {
165-
appId: '7H67QR5P0A',
166-
apiKey: '208bb9c14574939326032b937431014b',
167-
indexName: 'vitejs',
168-
searchParameters: {
169-
facetFilters: ['tags:en'],
165+
miniSearch: {
166+
searchOptions: {
167+
boostDocument(page) {
168+
if (page.startsWith('/guide/')) return 2 // Prefer guide pages
169+
if (page.startsWith('/config/')) return 1.5 // Then config pages
170+
if (page.startsWith('/blog/')) return 0 // Do not index blog posts
171+
return 1
172+
},
173+
},
170174
},
171-
insights: true,
172175
},
173176
},
174177

docs/public/_redirects

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# temporary, we'll flip this around some day
21
https://vitejs.dev/* https://vite.dev/:splat 301!
32

43
/guide/api-vite-runtime /guide/api-environment 301

0 commit comments

Comments
 (0)