@endpass/vuepress-plugin-search

1.0.0 • Public • Published

@endpass/vuepress-plugin-search

header-based search plugin for VuePress

Installation

Install package with npm:

npm i --save @endpass/vuepress-plugin-search

Or via yarn:

yarn add @endpass/vuepress-plugin-search

Usage

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.

Package Sidebar

Install

npm i @endpass/vuepress-plugin-search

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

9.87 kB

Total Files

6

Last publish

Collaborators

  • endpassid