Files
liquid/_posts/basics/index.md
2014-07-23 11:17:11 -04:00

1.9 KiB
Raw Permalink Blame History

layout, title, landing_as_article, nav
layout title landing_as_article nav
default Basics true
group weight
Liquid Documentation 1

Introduction

Liquid is an open-source, Ruby-based template language created by Shopify. It is the backbone of Shopify themes and is used to load dynamic content on storefronts.

Liquid uses a combination of tags, objects, and filters to load dynamic content. They are used inside Liquid template files, which are a group of files that make up a theme. For more information on the available templates, please see Theme Development.

{% table_of_contents %}

{% anchor_link "Tags", "tags" %}

Tags make up the programming logic that tells templates what to do.

{% highlight html %}{% raw %} {% if user.name == 'elvis' %} Hey Elvis {% endif %} {% endraw %}{% endhighlight %}

Read more

{% anchor_link "Objects", "objects" %}

Objects contain attributes that are used to display dynamic content on the page.

{% highlight html %}{% raw %} {{ product.title }} {% endraw %}{% endhighlight %}

Read more

{% anchor_link "Filters", "filters" %}

Filters are used to modify the output of strings, numbers, variables, and objects.

{% highlight html %}{% raw %} {{ 'sales' | append: '.jpg' }} {% endraw %}{% endhighlight %}

Read more