mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-19 02:05:51 +10:00
@vuepress/plugin-search
header-based search plugin for vuepress
Usage
- Enable this plugin:
// .vuepress/config.js or themedir/index.js
module.exports = {
plugins: [
['@vuepress/search', {
searchMaxSuggestions: 10
}]
],
// Tweak the default color via palette.
palette: {
$accentColor: '#b58900',
$textColor: '#586e75',
$borderColor: '#eaecef',
$codeBgColor: '#282c34',
$arrowBgColor: '#ccc'
}
}
- Using search component:
import SearchBox from '@SearchBox'
Options
searchMaxSuggestions
- Type:
number - Default:
true
Set the maximum number of results for search