jekyll-datapage_gen icon indicating copy to clipboard operation
jekyll-datapage_gen copied to clipboard

filter_condition: check if contains/has/includes?

Open jengajam opened this issue 1 year ago • 0 comments

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.

jengajam avatar Jan 04 '24 09:01 jengajam