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

Conversation

Raymi306
Copy link
Contributor

@Raymi306 Raymi306 commented Apr 27, 2023

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:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

Fixes #2165

If there is interest in continuing with this PR, I will update documentation

@Raymi306
Copy link
Contributor Author

@Jieiku This should enable you to do what you need

@Jieiku
Copy link
Contributor

Jieiku commented Apr 27, 2023

Thanks! Going to give it a try!

@Keats
Copy link
Collaborator

Keats commented Apr 28, 2023

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.

@Raymi306
Copy link
Contributor Author

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?

@Raymi306 Raymi306 changed the title Add search into the serialized config (#2165) Add search_index_format into the serialized config (#2165) Apr 28, 2023
@@ -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.

@Keats
Copy link
Collaborator

Keats commented Apr 29, 2023

I looked in the docs for places where I want to mention this variable being available, perhaps here in templates/overview?

No need I think, it's going to be part of the config which is documented.

Would you like any tests for this?

No need for just serialization

@Raymi306 Raymi306 marked this pull request as ready for review April 30, 2023 18:01
@Raymi306 Raymi306 changed the title Add search_index_format into the serialized config (#2165) Add search.index_format into the serialized config (#2165) Apr 30, 2023
@Keats Keats merged commit 7448309 into getzola:next May 1, 2023
@Keats
Copy link
Collaborator

Keats commented May 1, 2023

Thanks!

peterprototypes pushed a commit to peterprototypes/zola that referenced this pull request Sep 12, 2023
…tzola#2196)

* Add search into the serialized config (getzola#2165)

* Only expose index_format

* Create config.search struct

* cargo fmt
technimad pushed a commit to technimad/zola that referenced this pull request Sep 30, 2023
…tzola#2196)

* Add search into the serialized config (getzola#2165)

* Only expose index_format

* Create config.search struct

* cargo fmt
Keats pushed a commit that referenced this pull request Dec 18, 2023
* Add search into the serialized config (#2165)

* Only expose index_format

* Create config.search struct

* cargo fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants