@vuepress/plugin-search
TIP
Note that this plugin has been included in default theme, the search box you see now is powered by the plugin.
- Enable this plugin:
- This plugin will automatically inject a webpack alias pointing to the search component so that you can use it directly in your layout component:
- Type:
number
- Type:
RegExp
|Array<RegExp>
- Default:
Set up searchable paths with regular expressions. If no test expression is provided it will search on all paths. Considering you have this structure:
You can set up searchable paths with test
as:
- RegExp:
'/1.0/'
- Array of RegExp:
['/1.0/', '/2.0/']
- Type:
Array<string>
Configure the hotkeys which when pressed will focus the search box. Set to an empty array to disable this feature.
Since the Search component leverages the built-in palette, you can tweak the default colors via styles/palette.styl
: