docs icon indicating copy to clipboard operation
docs copied to clipboard

Error occurs when Algolia search

Open kenzo-tanaka opened this issue 2 years ago • 3 comments

Describe the bug Algolia search does not seem to be working.

To Reproduce Steps to reproduce the behavior:

  1. Go to top page https://sli.dev/
  2. Cmd+k
  3. Type something + Enter (redirect to https://sli.devundefined/ )
  4. Always no hits, and some error in developer console.

Desktop (please complete the following information):

  • OS: macOS Monterey
  • Browser: Google Chrome
  • Slidev version: Latest

kenzo-tanaka avatar Jul 31 '22 12:07 kenzo-tanaka

@antfu if you know the cause (I imagine it may have happened with other projects)

twitwi avatar Sep 21 '22 19:09 twitwi

I don't know why nor how to fix it. I didn't change anything, but basically all my docs's Algolia is broken. 🤷‍♂️

antfu avatar Sep 22 '22 02:09 antfu

I don't know why nor how to fix it. I didn't change anything, but basically all my docs's Algolia is broken. man_shrugging

I looked a little: the client is making requests to some undefined-dsn.algolia.net which is due to it not receiving an appId (from the algolia config object). I'm not sure if it should be specified as in https://github.com/vuejs/vitepress/blob/288aa48b92bc1d4dd74d064148a3b03373cdf1c3/docs/.vitepress/config.ts#L41 or if it should be a github secret or something (probably not as the apiKey is not).

Also, probably not the root of the problem but just in case, it seems language has been replaced by lang as in https://github.com/vuejs/vitepress/pull/459/files so there might need an update there https://github.com/slidevjs/docs/blob/18216961c9b829103d7ee5bc6c426cb525c3d51c/.vitepress/config.js#L259

twitwi avatar Sep 22 '22 14:09 twitwi

This seems to be fixed by recent commits, good.

twitwi avatar Oct 28 '22 11:10 twitwi