feat: Enhance SimpleSearch with AJAX, Highlighting & Pagination#204
Open
Maverick770 wants to merge 1 commit intogetgrav:developfrom
Open
feat: Enhance SimpleSearch with AJAX, Highlighting & Pagination#204Maverick770 wants to merge 1 commit intogetgrav:developfrom
Maverick770 wants to merge 1 commit intogetgrav:developfrom
Conversation
I've implemented several major enhancements to the SimpleSearch plugin:
1. **Search Suggestions (Autocomplete):**
* This provides live search suggestions as you type.
* It's powered by AJAX and configurable via the admin panel (you can enable it, set the minimum query length, and the maximum number of suggestions).
2. **AJAX Search Results Display:**
* I've added an option to display full search results via AJAX directly on the current page, without a full page reload.
* You can configure this via the admin panel (enable/disable).
3. **Search Term Highlighting:**
* I've made it so query terms are automatically highlighted in search result titles and content snippets using `<mark>` tags.
* This works for both AJAX and traditional results.
* I've added default styling for `<mark>` tags, which you can customize via CSS.
4. **Pagination for Results:**
* I've implemented pagination for both AJAX-loaded results and traditional server-rendered results pages.
* The number of results per page is configurable via the admin panel.
5. **Admin GUI Enhancements:**
* I've updated the plugin blueprints (`blueprints.yaml`) with toggles and settings for all new features.
6. **Documentation:**
* I've updated the `README.md` to reflect all new functionalities and configuration options.
These features significantly modernize the SimpleSearch plugin, improving your experience and providing more flexible search capabilities for Grav CMS sites.
Member
|
This does sound interesting! The only thing i am concerned about is backwards compatibility, all this funtionality is great, but people need to be able to update their existing sites that already have simplesearch integrated, and will expect things not to break. have you tested with say Blog Site skeleton or something similar? https://github.com/getgrav/grav-skeleton-blog-site if it's not backwards compatible, it could still be OK if ther's 'new' twig templates that can be used and leave the old twig templates to function as they always have? Just an idea. I'll need to check this out and investigate further. Cheers! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've implemented several major enhancements to the SimpleSearch plugin:
Search Suggestions (Autocomplete):
AJAX Search Results Display:
Search Term Highlighting:
<mark>tags.<mark>tags, which you can customize via CSS.Pagination for Results:
Admin GUI Enhancements:
blueprints.yaml) with toggles and settings for all new features.Documentation:
README.mdto reflect all new functionalities and configuration options.These features significantly modernize the SimpleSearch plugin, improving your experience and providing more flexible search capabilities for Grav CMS sites.