Understanding Liquid and its delimiters
One of the two ways that we can discern a Liquid file is by the extension .liquid
. Being a template language, a Liquid file is a combination of static and dynamic content:
- Elements that we write in HTML are called static content, and they stay the same no matter what page we are currently on.
- On the other side, elements written in Liquid are called dynamic content elements, whose content changes depending on the page we are on.
While our browsers can quickly process the HTML code, they would not know what to do with Liquid code as they do not understand it. We can break up the flow of what happens when we submit a Shopify URL to our browser into five logical steps:
- The Shopify server tries to determine which store we are trying to access.
- Depending on the type of page we are currently requesting information for, Shopify tries to locate and select the proper Liquid template from the active theme directory.
- After...