Basics

Mechanic uses Liquid, a template language created by Shopify. If you have worked with the code behind Shopify themes, you've worked with Liquid.

If you are new to Liquid or need a refresher, the next few sections will cover the basics of the language.

Mechanic's use of Liquid comes with a few extra features. It has all the core features of Liquid itself, and adds a few that specifically facilitate Mechanic development.

Shopify Liquid cheat sheet

Shopify offers an excellent Liquid cheat sheet, a quick reference for the fundamentals. Note, however, that Liquid objects documented here do not mirror the objects offered in Mechanic-flavored Liquid. When using this cheat sheet for Mechanic work, ignore the "Objects" section entirely. :)

Learn more about the difference between Shopify Theme Liquid objects and Mechanic objects here: Why aren't my Liquid variables giving me the Shopify data I expect?

Shopify's introduction to Liquid

Sources

Content in this section was compiled from the following Shopify resources:

Last updated