Content Search
About 297 wordsLess than 1 minute
2025-10-09
Local Search
Overview
Adds local search functionality to the site.
For feature details, please refer to Search Feature
Related plugin: @vuepress-plume/plugin-search
Default configuration:
.vuepress/config.ts
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
search: {
provider: 'local',
// more options...
},
})
})For configuration entry priority information, please refer to Plugin Configuration Entry.
Configuration
interface SearchOptions {
/**
* Local search internationalization
*/
locales?: {
[locale: string]: SearchBoxLocale
}
/**
* Whether articles are searchable, defaults to `() => true`
*
* Note: encrypted pages (matched by `encrypt.rules` or having a page `password`)
* are never indexed, because the search index is shipped as a public static asset
* and indexing them would leak their content.
*/
isSearchable?: (page: Page) => boolean
}
interface SearchBoxLocale {
placeholder: string
buttonText: string
resetButtonTitle: string
backButtonTitle: string
noResultsText: string
/**
* Text shown when the search index is missing or fails to load
*/
searchIndexErrorText?: string
/**
* Fallback text shown when JavaScript is disabled
*
* It is rendered inside `<noscript>`, so it must be plain text without
* HTML-escaped characters
*/
noscriptText?: string
footer: {
selectText: string
selectKeyAriaLabel: string
navigateText: string
navigateUpKeyAriaLabel: string
navigateDownKeyAriaLabel: string
closeText: string
closeKeyAriaLabel: string
}
}Algolia DocSearch
Overview
A site content search plugin powered by Algolia DocSearch
Related plugin: @vuepress/plugin-docsearch
Refer to Algolia DocSearch Reference for more information.
Enable
.vuepress/config.ts
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
search: {
provider: 'algolia',
appId: 'YOUR_APP_ID',
apiKey: 'YOUR_API_KEY',
indexName: 'YOUR_INDEX_NAME',Object literal may only specify known properties, and 'indexName' does not exist in type 'DocSearchOptions'. // more options
},
})
})For configuration entry priority information, please refer to Plugin Configuration Entry.
Contributors
Changelog
10/7/26, 4:09 PM
View All Changelog
3c257-feat(plugin-search): support search index shard loading (#1055)on9667f-fix(theme): prevent encrypted pages from being indexed by search (#1046)on1d04d-feat: add builtin auto-import-components (#932)on0daf2-docs: improve docs (#929)onaede6-fix(theme): twoslash comment error (#881)on38505-docs: update en docs (#708)on4d236-feat(theme)!: add collections support (#704)on74dfa-docs: enable twoslash for code blockon0fd6c-refactor(theme): improve types and flat config (#524)on0c53b-docs: improve docs (#332)on
