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
feat: Support single argument where filter like Liquid #7819
Comments
Yes, this is definitely a feature request but not sure if it will be fulfilled in the near future. Say someone has the following use case:
Allowing the return of the opposite data with the following can be confusing and complicated to implement and maintain, IMO:
|
Might I suggest, then, making this a bit clearer in the documentation, that there are some slight differences between the core Liquid filters and the Jekyll Liquid filters. Saying that "all the standard liquid filters are supported" and linking to the Liquid core documentation is I see that you have the section for Liquid filters, and the section before that for the Jekyll custom filters, but it could be a little more explicit that the second section is a subset of the standard liquid filters that are supported, and that the first section is Jekyll added functions. Might be good to say "not to be confused with the Liquid |
While the prevalence of the use case I pointed to above will be very low, (detecting |
This issue has been automatically marked as stale because it has not been commented on for at least two months. The resources of the Jekyll team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the latest If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open. This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions. |
Let's not change our filter and just document the differences for now. |
Hi all, I ran into this myself. Unless there's a publicly available report as to how many people in the community this affects (I'm not aware of such, and would love to know), it's hard to understand the size the audience that this touches. Operating on data is key. It was not clear to me that there was in fact a difference between Jekyll’s 'where' and Liquid’s 'where'. Ideas to help clarify the distinctionAdding documentation to state the nuances between Jekyll's implementation v.s. it's Liquid’s implementation is a great idea. A table might suffice - think gap analysis. Might there be an option for both in Jekyll? Choosing to use a prefix for the addition of Liquid's?Jekyll - Happy to hear your thoughts |
I've ran into the same issue and I like @VincentVToscano's idea of having a separate filter with Liquid's functionality, keeping the original For now I'm using an if statement to achieve what I wanted but it's a bit less elegant. |
@jekyll/core Whatsay? Should Jekyll 4.1 expose the upstream Liquid |
Since it is against the documented and intended behavior, it is definitely a bug. I don't see how #issuecomment-531844647 will be confusing to anyone. Also any idea how to select the elements from an array that have a value for a property? I am using github-pages, jekyll (= 3.9.0) edit: this seem to work:
|
Not sure if this is a feature request or a bug report.
Per the Liquid documentation, you can use a
where
filter with only one argument, and it will filter out all falsey values, instead of having to specify an exact expected value. This issue mentions that Jekyll's version of Liquid might have differences between the "core" Liquid, so I'm reporting this here.If this is known and intentional, this is a feature request. It would be a nice thing to have and use. And it would be good to keep feature parity with the core Liquid to avoid confusion.
If this is not intentional, and Jekyll's implementation of Liquid is meant to match core Liquid, then I suppose this is a bug report.
The text was updated successfully, but these errors were encountered: