We'll be going through all the basics you'll need to know to build a full fledged website.


There are two main types of operators in liquid:

  1. Tags
  2. Filters


Tags

These are denoted by a curly brace and a percentage sign, eg.


In the example above, a request is being made to MMS (the platform fleeksite runs on) to get blog posts for the current site, the tag is called collection, so the format is .

We can add a little more detail to this as well:

In this example, we are filtering the blogs by only getting blogs with the tag featured, then we are ordering the blogs by title, then finally limiting the number of blogs we get to 7.

Pretty useful and simple right?

great!


There are a number of tags, if you enter an invalid tag, then nothing will happen.


Filters

These are denoted by a pipe or vertical bar |. eg.

Liquid error: wrong number of arguments (1 for 2)


This little piece of code takes apple pie and splits it at the spaces, what you'd be left with is a list of two words, apple and pie.


Custom Tags


We have just two custom tags here at Fleeksite:

  1. Collections
  2. Partials


See the Liquid Documentation at the links below for further guidance:

  1. https://shopify.github.io/liquid/
  2. Liquid for Designers · Shopify/liquid Wiki · GitHub
  3. https://github.com/bettyblocks/liquid-elixir/tree/master/test/templates