vikejs / vike

🔨 Flexible, lean, community-driven, dependable, fast Vite-based frontend framework.
https://vike.dev
MIT License
4.25k stars 349 forks source link

Improve Algolia search #1749

Closed brillout closed 3 weeks ago

brillout commented 2 months ago

Description

The search on vike.dev is a bit erratic.

I guess it's mostly due to misconfiguring Algolia Docsearch. E.g the search on vitejs.dev seems much better.

Same post on Algolia's forum.

How to avoid duplicates in the result list?

For example, searching for "oncreateapp" lists the page https://vike.dev/onCreateApp twice.

How to also search code snippets?

It seems like code blocks are ignored. For example, searching for "addMiddleware" shows No result even though "addMiddleware" is present on the page vike.dev/renderPage (inside the first code block).

How to show all results?

For example, searching for "oncreateapp" doesn't list the page https://vike.dev/vuex but does list https://vike.dev/pinia even though both pages share the same text matching "oncreateapp".

It seems like Docsearch only shows the top results? Can we configure it to show all results?

brillout commented 3 weeks ago

Fixed by @phonzammi :100: :green_heart: