Making Chinese and Japanese search indexing optional... (#1115)
* This can shave ~80 MB off the binary size while allowing users speaking these two languages to easily switch them back on
This commit is contained in:
parent
4a3c1568a2
commit
6af7959fce
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2817,6 +2817,7 @@ dependencies = [
|
|||
"notify",
|
||||
"open",
|
||||
"rebuild",
|
||||
"search",
|
||||
"site",
|
||||
"termcolor",
|
||||
"tokio",
|
||||
|
|
|
@ -41,6 +41,7 @@ errors = { path = "components/errors" }
|
|||
front_matter = { path = "components/front_matter" }
|
||||
utils = { path = "components/utils" }
|
||||
rebuild = { path = "components/rebuild" }
|
||||
search = { path = "components/search" }
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
|
|
|
@ -12,3 +12,8 @@ lazy_static = "1"
|
|||
errors = { path = "../errors" }
|
||||
library = { path = "../library" }
|
||||
config = { path = "../config" }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
indexing-zh = ["elasticlunr-rs/zh"]
|
||||
indexing-ja = ["elasticlunr-rs/ja"]
|
||||
|
|
|
@ -20,6 +20,12 @@ languages = [
|
|||
If you want to use per-language taxonomies, ensure you set the `lang` field in their
|
||||
configuration.
|
||||
|
||||
Note: By default, Chinese and Japanese search indexing is not included. You can include
|
||||
the support by building `zola` using `cargo build --features search/indexing-ja search/indexing-zh`.
|
||||
Please also note that, enabling Chinese indexing will increase the binary size by approximately
|
||||
5 MB while enabling Japanese indexing will increase the binary size by approximately 70 MB
|
||||
due to the incredibly large dictionaries.
|
||||
|
||||
## Content
|
||||
Once the languages have been added, you can start to translate your content. Zola
|
||||
uses the filename to detect the language:
|
||||
|
|
Loading…
Reference in a new issue