Files
vuepress/packages/@vuepress/plugin-search
2018-09-27 13:25:19 +08:00
..
2018-09-24 01:17:32 +08:00
2018-09-24 01:17:32 +08:00
2018-09-27 13:25:19 +08:00
2018-09-24 01:17:32 +08:00
2018-09-24 01:17:32 +08:00
2018-09-24 01:17:32 +08:00

@vuepress/plugin-search

header-based search plugin for vuepress

Usage

  1. 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'
  }
}
  1. Using search component:
import SearchBox from '@SearchBox'

Options

searchMaxSuggestions

  • Type: number
  • Default: true

Set the maximum number of results for search