Skip to content

Commit

Permalink
Fix multi-lingual json index (getzola#2197)
Browse files Browse the repository at this point in the history
* Fix multi-ligual json index

* multi-lingual search Fix cargo fmt
  • Loading branch information
Jieiku authored and Erwin Vrolijk committed Sep 30, 2023
1 parent b8c3ae2 commit 50e597a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions components/site/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,7 @@ impl Site {
}

fn index_for_lang(&self, lang: &str) -> Result<()> {
let index_json = search::build_index(
&self.config.default_language,
&self.library.read().unwrap(),
&self.config,
)?;
let index_json = search::build_index(lang, &self.library.read().unwrap(), &self.config)?;
let (path, content) = match &self.config.search.index_format {
IndexFormat::ElasticlunrJson => {
let path = self.output_path.join(format!("search_index.{}.json", lang));
Expand Down

0 comments on commit 50e597a

Please sign in to comment.