Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences: image_caption.html imageurl=“http://blog.local/images/home/image.jpg” Valid syntax: {% include file.ext param=‘value’ param2=‘value’ %} in index.html
My Reproduction Steps
Use a variable inside an include tag, my example is: {% include image_caption.html imageurl="{{ site.url }}/images/home/image.jpg" title="some title text" caption="some caption text" %}
So I guess there’s some escaping to be done in this: {% imageurl="{{ site.url }} %} or is that not something achievable?
I’m not into Ruby, so getting stuck here. Any advice appreciated.
the problem is you cannot use curly brackets inside the include - it breaks it. So if you want to do that you have to assign the variable outside of the include: