Usage
5/8/25Less than 1 minute
npm i -D vuepress-plugin-meilisearch2
import { defineUserConfig } from 'vuepress';
import { MeiliSearchPlugin } from 'vuepress-plugin-meilisearch2'
defineUserConfig({
plugins: [
MeiliSearchPlugin({
// Configuration options
host: '',
apiKey: '',
indexUid: '',
})
]
})
Options
host
Type:
string
Required:
true
Details:
Provide the HTTP address of the MeiliSearch API
apiKey
Type:
string
Required:
true
Details:
API key generated by MeiliSearch
indexUid
Type:
string
Required:
true
Details:
Specify the index name used for searching
translations
Type:
DocSearchTranslations
Required:
false
Details:
button and modal
hotKeys
Type:
false | string[]
Required:
false
Details:
Default keys are
['ctrl+k', 's', '/']
, Set tofalse
to disable default keys.
debounceDuration
Type:
number | false
Required:
false
Details:
Duration to wait between keystores to determine whether a search should happen or not. Defaults to
200
. Set tofalse
to disable debouncing.
searchParams
Type:
SearchParams
Required:
false
Details:
limit(number)
- Maximum number of documents returned per query, default is20
offset(number)
- Starting offset for search results, default is0
- more
Components
- SearchBox