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",
|
"notify",
|
||||||
"open",
|
"open",
|
||||||
"rebuild",
|
"rebuild",
|
||||||
|
"search",
|
||||||
"site",
|
"site",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|
|
@ -41,6 +41,7 @@ errors = { path = "components/errors" }
|
||||||
front_matter = { path = "components/front_matter" }
|
front_matter = { path = "components/front_matter" }
|
||||||
utils = { path = "components/utils" }
|
utils = { path = "components/utils" }
|
||||||
rebuild = { path = "components/rebuild" }
|
rebuild = { path = "components/rebuild" }
|
||||||
|
search = { path = "components/search" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
|
|
|
@ -12,3 +12,8 @@ lazy_static = "1"
|
||||||
errors = { path = "../errors" }
|
errors = { path = "../errors" }
|
||||||
library = { path = "../library" }
|
library = { path = "../library" }
|
||||||
config = { path = "../config" }
|
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
|
If you want to use per-language taxonomies, ensure you set the `lang` field in their
|
||||||
configuration.
|
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
|
## Content
|
||||||
Once the languages have been added, you can start to translate your content. Zola
|
Once the languages have been added, you can start to translate your content. Zola
|
||||||
uses the filename to detect the language:
|
uses the filename to detect the language:
|
||||||
|
|
Loading…
Reference in a new issue