Skip to content

Commit

Permalink
Fix multi-lingual json index (#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 Keats committed Dec 18, 2023
1 parent 63054a9 commit d72ebb1
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 d72ebb1

Please sign in to comment.