How to filter Jekyll post list [loop] with multi categories without opening a new page?


#1

Hello!

I didn’t get an answer for this question on StackOverFlow, so perhaps there is someone on this talk who could help.

How could I filter the list of Jekyll posts [loop] with for instance a checkbox like JpList does here: https://jplist.com/controls/button-filters ?

The idea is to not open a new page but show the filtered results on the same page.

Also, the posts will have multiple categories e.g. one post can be [video,audio] others [audio,programming], etc…

Do I need to implement some javascript/plugin?

Thank you! k


#2

yes. You could make a json file with a for loop that has all the basic info from your posts and then load that via js and filter it like that. I have not done this, but I think that is the best way to do it. I don’t think you need a plugin, just some js.


#3

Thanks, I’ll look into this.