Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds highlighting to the post title and excerpt in search results when using Algolia via the backend.
Highlighting is enabled by default, but can be disabled using the
algolia_search_highlighting_enabled
filter. The bundled styles for the highlights themselves are enabled by default, but can also be disabled using thealgolia_search_highlighting_enable_bundled_styles
filter if the developer wants to provide their own styles.The bundled styles' appearance matches that currently provided by Instantsearch.js (light yellow background color):
![Screen Shot 2019-11-22 at 7 30 37 AM](https://user-images.githubusercontent.com/1446874/69425995-144a6a80-0cfa-11ea-8b44-0fccb2fb6dd0.png)
There are currently no options page settings for disabling highlighting or the bundled styles, as I expect the defaults will be useful for most users, and advanced users can use the filters provided by the plugin to change the highlight settings and/or tags.