algolia / jekyll-algolia

Add fast and relevant search to your Jekyll site
https://community.algolia.com/jekyll-algolia/
MIT License
214 stars 35 forks source link

QUESTION: Is it possible to use the InstantSearch refinementlist with Jekyll #115

Open mrpbennett opened 5 years ago

mrpbennett commented 5 years ago

If so how is the best way to implement this? I have the standard search and results, but id like to be able to filter this via check boxes.

pixelastic commented 5 years ago

Yep, it would be definitely possible.

What would you like to filter on? By default all records have a collection, categories and tags field setup when applicable. Values for those fields are directly extracted from Jekyll collections/categories/tags. You can use those fields in the InstantSearch widget configuration to add some checkbox filtering.

If you'd like to filter on other custom properties, you might need to update the settings option to pass your own attributesForFaceting.

mrpbennett commented 5 years ago

Thanks for the reply @pixelastic I managed to get this sorted after some tinkering and I am just blown away by the speed of it. I really did just geek over a search function! 👍