Shopify Liquid Cheat Sheet

Before I hop into one of my most favorite resources of all time (hint: it's The Shopify Liquid Cheat Sheet) let's talk about why knowing and using Liquid as a developer working in Shopify projects is so important.

Background on Shopify Liquid

Liquid is Shopify's templating language and it was created by the co-founder and CEO of Shopify Tobias Lütke. Written in Ruby, it is used not only extensively within Shopify, but all over the web in various projects - everything from static site generators (SSGs) like Jekyll to software projects like Zendesk.

Liquid is essential to know now as a web developer working in Shopify and unlocks loads of tools. You can learn more about the backstory on Liquid in this post from Shopify or by checking the Github repository, the Liquid landing page, or the Shopify Developer docs.

Liquid has essentially three main components:

  • Objects: "contain the content that Liquid displays on a page. Objects and variables are displayed when enclosed in double curly braces: {{ and }} ."

Shopify Liquid Objects example

  • Tags: "create the logic and control flow for templates. The curly brace percentage delimiters {% and %} and the text that they surround do not produce any visible output when the template is rendered. This lets you assign variables and create conditions or loops without showing any of the Liquid logic on the page."

Shopify Liquid Tags example

  • Filters: "change the output of a Liquid object or variable. They are used within double curly braces {{ }} and variable assignment, and are separated by a pipe character | ."

Shopify Liquid Filters example

So What is the Shopify Liquid Cheat Sheet?

The Shopify Liquid Cheat Sheet is one of the greatest tools as a Shopify Dev you can throw in your tool belt. It quickly references Objects, Filters, and Tags with links to further details directly in the docs.

Shopify Liquid Cheat Sheet example

This cheat sheet has saved me so much time when I cannot recall a reference. Rather than having to jump in and scour the documents for what feels like hours, I've been able to find what I needed in seconds.

I have this up pretty much all day in a tab and find it to be one of the most useful resources Shopify has created.

Back to blog