mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 11:04:12 -04:00
feat: add customize flexsearch tokenize feature instruction to docs (#322)
* feat: add customize flexsearch tokenize feature instruction to docs * Update configuration.md * Update configuration.md * Update configuration.zh-cn.md --------- Co-authored-by: loenvom <loenvom@qq.com> Co-authored-by: Xin <xin@imfing.com>
This commit is contained in:
@ -251,6 +251,23 @@ Options for `flexsearch.index`:
|
||||
- `heading` - level 1 and level 2 headings
|
||||
- `title` - only include the page title
|
||||
|
||||
To customize the search tokenize, set the `params.search.flexsearch.tokenize` parameter in the config file:
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
params:
|
||||
# ...
|
||||
flexsearch:
|
||||
# full | forward | reverse | strict
|
||||
tokenize: forward
|
||||
```
|
||||
|
||||
Options for [`flexsearch.tokenize`](https://github.com/nextapps-de/flexsearch/#tokenizer-prefix-search):
|
||||
|
||||
- `strict` - index whole words
|
||||
- `forward` - incrementally index words in forward direction
|
||||
- `reverse` - incrementally index words in both directions
|
||||
- `full` - index every possible combination
|
||||
|
||||
To exclude a page from the search index, set the `excludeSearch: true` in the front matter of the page:
|
||||
|
||||
```yaml {filename="content/docs/guide/configuration.md"}
|
||||
|
Reference in New Issue
Block a user