-
Notifications
You must be signed in to change notification settings - Fork 963
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
Conversation
@Jieiku This should enable you to do what you need |
Thanks! Going to give it a try! |
I would start with just the index format serialized and then we can see if we need more. The rest feels like config that you don't need in the templates. |
This makes sense. I looked in the docs for places where I want to mention this variable being available, perhaps here in templates/overview? Would you like any tests for this? |
components/config/src/config/mod.rs
Outdated
@@ -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, |
There was a problem hiding this comment.
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.
No need I think, it's going to be part of the config which is documented.
No need for just serialization |
Thanks! |
…tzola#2196) * Add search into the serialized config (getzola#2165) * Only expose index_format * Create config.search struct * cargo fmt
…tzola#2196) * Add search into the serialized config (getzola#2165) * Only expose index_format * Create config.search struct * cargo fmt
IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.
The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
next
branch?If the change is a new feature or adding to/changing an existing one:
Fixes #2165
If there is interest in continuing with this PR, I will update documentation