You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is documentation on how to use your own Typesense server in Vuepress. This seems to be created for VuePress 1.x. I cannot get it to work on VuePress 2.x.
Broken component
The component TypesenseSearchBox.vue does not work out of the box anymore for multiple reasons.
Components are not automatically registered anymore. You need to install the plugin @vuepress/plugin-register-components and configure this.
It requires the docsearch dependency, but this is not included. You need to install the plugin @vuepress/plugin-docsearch for this. Couldn't get this to work, so I manually downloaded the docsearch javascript files and added this.
Options are not configurable anymore in themeConfig. This works differently. I don't know what would be the equivalent.
What I tried
I tried to configure the plugin @vuepress/plugin-docsearch. I think this is the way forward, but I could not make it work. The reason is that I cannot get a proper client to work. Maybe somebody with expertise can help me figure this out.
What I did:
Create a new VuePress 2 project.
Install the plugin @vuepress/plugin-docsearch.
Created the file src/.vuepress/client.ts and gave it the following content:
import {defineDocSearchConfig} from "@vuepress/plugin-docsearch/client";
defineDocSearchConfig({
// @ts-ignore
transformSearchClient: (searchClient) => {
return ??? // What to fill in here?
}
})
I think if I could make this transformSearchClient work, then it would be perfect. However, I don't know what to use. I tried to use typesense-docsearch, but this requires React, and that doesn't work. I hope that we can figure this out, and if we do, that we document it on the website as well.
The text was updated successfully, but these errors were encountered:
Description
There is documentation on how to use your own Typesense server in Vuepress. This seems to be created for VuePress 1.x. I cannot get it to work on VuePress 2.x.
Broken component
The component
TypesenseSearchBox.vue
does not work out of the box anymore for multiple reasons.@vuepress/plugin-register-components
and configure this.@vuepress/plugin-docsearch
for this. Couldn't get this to work, so I manually downloaded the docsearch javascript files and added this.What I tried
I tried to configure the plugin
@vuepress/plugin-docsearch
. I think this is the way forward, but I could not make it work. The reason is that I cannot get a proper client to work. Maybe somebody with expertise can help me figure this out.What I did:
@vuepress/plugin-docsearch
.src/.vuepress/client.ts
and gave it the following content:I think if I could make this transformSearchClient work, then it would be perfect. However, I don't know what to use. I tried to use
typesense-docsearch
, but this requires React, and that doesn't work. I hope that we can figure this out, and if we do, that we document it on the website as well.The text was updated successfully, but these errors were encountered: