I recently updated my site to Jekyll 4.2. One of my pages is now throwing an error in the build process (but not actually causing any problems in the site itself).
The error:
Liquid Warning: Liquid syntax error (line 108): Unexpected character { in "{{site.data.logos | where: {{industry}}, 'TRUE' }}" in industries/example-page.html
I have this section on several pages, and so I typically use an include, with the {{industry}} defined earlier on the page. In this case, I needed some extra CSS for the section, so I just wrote the whole thing out in the HTML page. Here's where I'm getting stumped:
- The error only shows up for the page that has the code written out long-form. If I use an include (even the one that I've pasted below, the code from the problematic page), no error.
- If I copy and paste the entire code from the (working) include into the HTML page, I still get the error.
Here's the HTML that's throwing the error:
<section>
<div class="row">
{% assign all-logos = site.data.logos | where: {{industry}}, 'TRUE' %}
{% for logo in all-logos %}
<a href="/link-here">
<div class="col-sm-2 col-xs-6">
<img data-src="img/{{ logo.img }}">
</div>
</a>
{% endfor %}
</div>
</section>
So here's my question: Why does the code work in an include, and throw an error otherwise?
Thank you!