avillafiorita / jekyll-datapage_gen

Generate one page per yaml record in Jekyll sites.
367 stars 79 forks source link

filter_condition: check if contains/has/includes? #129

Open jengajam opened 6 months ago

jengajam commented 6 months ago

As with most of us using your plugin, thanks for creating it and saving us hours of work having to process pages manually like some crazy person.

I'm new to Jekyll, and I've had moderate success putting everything together for the thing I'm working on.

I'm currently in need of putting together category pages for the pages generated using your plugin. I've noted that filter_condition is what I'm looking for. And understand that you can set aside a set of books written by George Orwell.

The pages I generate with JDG contain an array of categories in the dataset eg. catAll: "Fruits, Vegetables, Drinks". Far as I understand, filter_condition requires the == or similar operator, but is there an operator for "contains"? Looking at ruby expressions, =~ isn't recognised and draws an error when I build the site. I don't want the category page to be specifically for Fruits, Vegetables and Drinks, but if catAll contains Drinks, can I generate a category page from that?

I apologise if this isn't the place to ask, and thank you for your time.