vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

Algolia Search : transformItems not work

Open Alsmile opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Algolia Search : transformItems not work.

image

Describe the solution you'd like

I want http://hostname/prefix/guide/ -> http://hostname/guide/

Describe alternatives you've considered

No response

Additional context

No response

Validations

Alsmile avatar Apr 26 '22 03:04 Alsmile

Two ways

  1. reform your source code dir struct
  2. rewrite URL with Cloudflare transform rule

initdc avatar May 28 '22 14:05 initdc

console.log(item.url) first

initdc avatar May 28 '22 15:05 initdc

Not possible to do it using config as functions are not serializable (x-ref https://github.com/vuejs/vitepress/issues/1381#issuecomment-1337162977). Manually create an Algolia component and register it in on of the navbar slots.

brc-dd avatar Jan 04 '23 11:01 brc-dd