-
-
Notifications
You must be signed in to change notification settings - Fork 10k
-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for "contains" in "where" filter? #2787
Comments
Does Line 354 in 00c898b
|
@parkr - ah, had not seen that. That will serve my needs for this case. |
Glad to hear we already have what you need! |
Sorry to resurrect a relatively old issue, but I ran into this recently as well. In my case, I want to filter a collection based on a specific category. Each collection item can belong to an arbitrary number of categories, and I need to be able to get a list of items in a particular category. Something like this is what I am hoping for:
|
Me too. So: would be ideal. |
We are not SQL, so your example will never happen @Lemez but if you would like to suggest a more viable syntax that doesn't require us to parse please file a new ticket and spark a conversation rather than necromancing an old ticket. Thanks. |
I'd like to be able to filter posts on my site based on the inclusion of a certain tag. Currently, I have to do it like this:
I would like support for checking if a collection contains an item as part of the
where
clause. The work-around is okay, but it will require extra effort if we want to e.g. limit it to the first 5 posts matching a tag (since you'd have to track the count manually).Maybe something like:
or if tags are important enough,
I'm happy to work on a PR if this is appropriate for Jekyll core - I'm less interested in a custom plugin since all my Jekyll stuff is deployed to GH Pages.
The text was updated successfully, but these errors were encountered: