vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.17k stars 2.12k forks source link

Algolia search result is empty #3614

Closed galgaxy3 closed 7 months ago

galgaxy3 commented 8 months ago

Describe the bug

Hello, when I was searching using Algolia, the search results on the vitepress page were not displayed. However, Algolia's console page showed 140 records. Is this a missing configuration? By the way, for the project reason, I didn't use docsearch, but Algolia's build plan

Reproduction

The error can be seen on this website https://stackblitz.com/edit/vite-48o9dv?file=docs%2F.vitepress%2Fconfig.ts,package.json This is the source code of the website https://github.com/galgaxy3/docs-demo

Expected behavior

There should be a query result

System Info

Chrome, vitepress 1.0.0-rc.44

Additional context

No response

Validations

brc-dd commented 8 months ago

Seems like language is not being indexed there 👀 You probably will need to set lang in attributesForFaceting in your crawler config. Refer this comment - https://github.com/vuejs/vitepress/issues/1935#issuecomment-1433765099 or the docs for complete crawler config - https://vitepress.dev/reference/default-theme-search#crawler-config

brc-dd commented 7 months ago

Closing as stale.