Can I bind / bind labels to liquids as a one-liner? Is there a separator character?
This is the code that works fine in jekyll template:
{% if link.url contains 'http' %}
{% assign domain = '' %}
{% else %}
{% assign domain = site.url %}
{% endif %}
Is there a way to do it in one layer in a liquid something like this:
{% if link.url contains 'http' assign domain = '' else assign domain = site.url endif %}
Or do I always need to use {% %}
to separate commands? It looks so ugly.
{% if link.url contains 'http' %}{% assign domain = '' %}{% else %}{% assign domain = site.url %}{% endif %}
+3
source to share