Skip to content
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

Filter where not completely compatible with Jekyll #768

Closed
lsolesen opened this issue Nov 14, 2024 · 1 comment
Closed

Filter where not completely compatible with Jekyll #768

lsolesen opened this issue Nov 14, 2024 · 1 comment

Comments

@lsolesen
Copy link

I am transferring a site from Jekyll to 11ty. There I was hoping that where filter is working in the same way.

I can get the baked in where filter to work with strings. However, it does not work if the key contains an array.

If my frontmatter has this:

tags:
  - Liquidjs

Then I cannot do:

{% assign site_posts = collections.posts | where: "tags", "Liquidjs" %}

It will work, if tags were just a string:

tags: Liquidjs

Making it compatible with Jekyll liquid where filter, would make transitions way easier.

@harttle harttle added the bug label Nov 15, 2024
harttle added a commit that referenced this issue Nov 17, 2024
harttle added a commit that referenced this issue Nov 17, 2024
github-actions bot pushed a commit that referenced this issue Nov 17, 2024
# [10.19.0](v10.18.0...v10.19.0) (2024-11-17)

### Features

* allow drops in property access ([#769](#769)) ([11f013b](11f013b))
* support Jekyll style `where`, [#768](#768) ([9107eb1](9107eb1))
@harttle
Copy link
Owner

harttle commented Nov 17, 2024

I found Jekyll where is indeed different from that of Shopify/liquid. Added a jekyllWhere option to mimic Jekyll behaviour, please try 10.19.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants