this plugin will replace keyword search in gitbook to your language.
lunr.js is used for a key word search in gitbook. but tokenizer and stemmer of lunr.js is default setting. That means that it's only English setting. this plugin will replace keyword search in gitbook to your language.
This plug-in uses lunr-languages in tokenizer and stemmer.
lunr-languages is supporting following languages.
language | code |
---|---|
German | de |
French | fr |
Spanish | es |
Italian | it |
Japanese | jp |
Dutch | du |
Danish | da |
Portuguese | pt |
Finnish | fi |
Romanian | ro |
Hungarian | hu |
Russian | ru |
Norwegian | no |
Turkish | tr |
Swedish | sv |
this plugin strongly depend on lunr-languages.
Add it to your book.json
configuration:
{
...
"plugins": [
"-lunr",
"search-languages"
],
...
"pluginsConfig": {
"searchLanguages": {
"lang": "jp"
}
}
}
$ gitbook install
following option was inherited from plugin-lunr.
default is 1000000
.
...
"pluginsConfig": {
"searchLanguages": {
"maxIndexSize": true
}
}
}
By default, special characters will be taken into account, to allow special searches like "C++" or "#word".
You can disable this if your text is essentially English prose with the ignoreSpecialCharacters
option:
...
"pluginsConfig": {
"searchLanguages": {
"ignoreSpecialCharacters": true
}
}
}
- version 0.1.1 (2016-12-29) fix: updated the outdated libs.
- version 0.1.0 (2016-12-24) fix: Overall fix to remove "WIP" condition (#1)
- version 0.0.1 (2015-11-17)