Liquid variables with filters are not being interpreted correctly
sparanoid opened this issue · 0 comments
sparanoid commented
Input:
<!-- A global capture defines elsewhere -->
{%- capture theme_base %}{{ site.theme | prepend: "/themes/" | relative_url }}{% endcapture -%}
<!-- Show the image -->
{% svg "{{ theme_base | prepend: site.assets }}/img/logo.svg" %}
Error:
Error: No such file or directory @ rb_sysopen - /path/to/jekyll-site/{{ theme_base | prepend: site.assets }}/img/logo.svg
Other filters like plus
, downcase
are also affected.
My workaround:
...
{%- assign logo_base = theme_base | prepend: site.assets -%}
{% svg "{{ logo_base }}/img/logo.svg" %}