Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/z3by/vuepress-plugin-flexsearch
Next-Generation full text search library for Vuepress
https://github.com/z3by/vuepress-plugin-flexsearch
flexsearch vuepress vuepress-plugin vuepress-plugin-flexsearch
Last synced: 3 months ago
JSON representation
Next-Generation full text search library for Vuepress
- Host: GitHub
- URL: https://github.com/z3by/vuepress-plugin-flexsearch
- Owner: z3by
- License: mit
- Created: 2020-01-14T20:45:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T21:37:46.000Z (almost 2 years ago)
- Last Synced: 2024-06-29T20:04:59.466Z (5 months ago)
- Topics: flexsearch, vuepress, vuepress-plugin, vuepress-plugin-flexsearch
- Language: Vue
- Size: 1.09 MB
- Stars: 41
- Watchers: 4
- Forks: 16
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![https://badgen.net/npm/v/vuepress-plugin-flexsearch](https://badgen.net/npm/v/vuepress-plugin-flexsearch)](https://www.npmjs.com/package/vuepress-plugin-flexsearch)
[![https://badgen.net/npm/dt/vuepress-plugin-flexsearch](https://badgen.net/npm/dt/vuepress-plugin-flexsearch)](https://www.npmjs.com/package/vuepress-plugin-flexsearch)
[![https://badgen.net/npm/license/vuepress-plugin-flexsearch](https://badgen.net/npm/license/vuepress-plugin-flexsearch)](https://github.com/z3by/vuepress-plugin-flexsearch/blob/master/LICENSE)
[![https://badgen.net/github/contributors/z3by/vuepress-plugin-flexsearch](https://badgen.net/github/contributors/z3by/vuepress-plugin-flexsearch)](https://github.com/z3by/vuepress-plugin-flexsearch/graphs/contributors)# vuepress-plugin-flexsearch
Next-Generation full text search library for Vuepress
> A great replacement of the default Vuepress search plugin.
## Installation
```bash
yarn add -D vuepress-plugin-flexsearch
// or npm install vuepress-plugin-flexsearch -D```
## Usage
Use the default settings:
```js
// .vuepress/config.jsmodule.exports = {
plugins: [
['flexsearch'],
// other plugins
]
}
```Or modify the settings to match your needs:
```js
// .vuepress/config.jsmodule.exports = {
plugins: [
['flexsearch', {
/*
Plugin custom options
*/
maxSuggestions: 10, // how many search suggestions to show on the menu, the default is 10.
searchPaths: ['path1', 'path2'], // an array of paths to search in, keep it null to search all docs.
searchHotkeys: ['s'], // Hot keys to activate the search input, the default is "s" but you can add more.
searchResultLength: 60, // the length of the suggestion result text by characters, the default is 60 characters.
splitHighlightedWords: ' ', // regex or string to split highlighted words by, keep it null to use flexsearch.split
noExtraSpaceAfterHtmlTag: false, // don't add extra spaces in highlighted results
/*
Default FlexSearch options
To override the default options you can see available options at https://github.com/nextapps-de/flexsearch
*/
search_options: {
encode: "icase",
tokenize: "forward",
resolution: 9,
doc: {
id: "key",
field: ["title", "content", "headers"],
}
}
}],
// other plugins
]
}
```## Credit
Thanks to [nextapps-de/flexsearch](https://github.com/nextapps-de/flexsearch)
## Contributions
PRs are welcome :heart: