Mechanic keyword literals
Available keywords
Examples
{% comment %} Start with an empty array and add items {% endcomment %}
{% assign tags = array %}
{% assign tags = tags | push: "vip" | push: "wholesale" %}
{% comment %} Build a hash for structured data {% endcomment %}
{% assign customer_data = hash %}
{% assign customer_data["name"] = "Alice" %}
{% assign customer_data["email"] = "[email protected]" %}
{% comment %} Split a multi-line string into an array of lines {% endcomment %}
{% assign lines = some_text | split: newline %}Last updated
Was this helpful?