Skip to content

Failed to generate search index for zh-Hans #2800

@Gabirel

Description

@Gabirel

Bug Report

Environment

Zola version: zola 0.20.0 (custom build with: cargo build --release --features indexing-ja --features indexing-zh)

Expected Behavior

Success to generate zh-Hans search index.

Current Behavior

It only works for Japanese, but not for zh-Hans. I believe it may be a bug for zola.

$ ls public/ | grep search_ 
search_index.en.json
search_index.ja.json

Build for zh-Hans

$ RUST_BACKTRACE=1 /Users/apple/zola/target/release/zola serve
Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 23 pages (0 orphan) and 11 sections
Error: Failed to serve the site
Error: Tried to build search index for language zh-Hans which is not supported

Step to reproduce

  1. enable zh-Hans language and its corresponding search index flag
  2. build zola with ja and zh index feature with: cargo build --release --features indexing-ja --features indexing-zh
$ cargo build --release --features indexing-ja --features indexing-zh
    Finished `release` profile [optimized] target(s) in 0.50s
warning: the following packages contain code that will be rejected by a future version of Rust: quick-xml v0.17.2
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
$ du -sh ./target/release/zola
110M	./target/release/zola
  1. run custom built zola serve, and get errors.

Reference

  • commit for building: 379f6c1f622ffeb2793c11301efbcf6f49b97138
  • theme I am using: tabi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions