Variable tags create new Liquid variables. Here are the two most common tags but you can learn more in .
assign
Creates a new named variable.
Input
{% assign foo = "bar" %}
{{foo}}
Output
bar
capture
Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created using capture are stored as strings.
Input
{% assign favorite_food = "pizza" %}
{% assign age = 35 %}
{% capture about_me %}
I am {{age}} and my favorite food is {{favorite_food}}.
{% endcapture %}
{{about_me}}