vitepress
vitepress copied to clipboard
Algolia Search : transformItems not work
Is your feature request related to a problem? Please describe.
Algolia Search : transformItems not work.
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
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Read the Contributing Guidelines.
- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
Two ways
- reform your source code dir struct
- rewrite URL with Cloudflare transform rule
console.log(item.url)
first
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.