diff --git a/components/config/src/config/mod.rs b/components/config/src/config/mod.rs index e0674276dd..2cda172127 100644 --- a/components/config/src/config/mod.rs +++ b/components/config/src/config/mod.rs @@ -109,6 +109,7 @@ pub struct SerializedConfig<'a> { build_search_index: bool, extra: &'a HashMap, markdown: &'a markup::Markdown, + search: search::SerializedSearch<'a>, } impl Config { @@ -331,6 +332,7 @@ impl Config { build_search_index: options.build_search_index, extra: &self.extra, markdown: &self.markdown, + search: self.search.serialize(), } } } diff --git a/components/config/src/config/search.rs b/components/config/src/config/search.rs index c96a874847..26c78f7464 100644 --- a/components/config/src/config/search.rs +++ b/components/config/src/config/search.rs @@ -44,3 +44,14 @@ impl Default for Search { } } } + +impl Search { + pub fn serialize(&self) -> SerializedSearch { + SerializedSearch { index_format: &self.index_format } + } +} + +#[derive(Serialize)] +pub struct SerializedSearch<'a> { + pub index_format: &'a IndexFormat, +}