Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add search.index_format into the serialized config (#2165) #2196

Merged
merged 4 commits into from
May 1, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/config/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ pub struct SerializedConfig<'a> {
build_search_index: bool,
extra: &'a HashMap<String, Toml>,
markdown: &'a markup::Markdown,
search_index_format: &'a search::IndexFormat,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can create a new struct (have a look at how we do it for page and sections) for the data serialized so if we add more items it's nicely contained.

}

impl Config {
Expand Down Expand Up @@ -331,6 +332,7 @@ impl Config {
build_search_index: options.build_search_index,
extra: &self.extra,
markdown: &self.markdown,
search_index_format: &self.search.index_format,
}
}
}
Expand Down