1.0.0 • Published 6 years ago
@endpass/vuepress-plugin-search v1.0.0
@endpass/vuepress-plugin-search
header-based search plugin for VuePress
Installation
Install package with npm:
npm i --save @endpass/vuepress-plugin-searchOr via yarn:
yarn add @endpass/vuepress-plugin-searchUsage
Update plugins section in your theme index.js file or into .vuepress/config.js:
module.exports = {
plugins: [
'@endpass/vuepress-plugin-search',
{
searchMaxSuggestions: 10,
test: '^(?!.*includes)\\S+.md$'
}
]
}Import and use comonent in your layouts and components:
<template>
<search-box />
</template>
<script>
import SearchBox from '@endpass/vuepress-plugin-search/SearchBox'
export default {
components: {
SearchBox
}
}
</script>Difference between original plugin
test accepts string or string[] and filters all results, not directories.
For example, if you want to leave .md files from foo directory, you should pass
'^foo\/\\S+' to test option.
1.0.0
6 years ago