Liqiud basics
Modules
API
Mailer
Introduction
Overview
Liquid code can be categorized into objects, tags, and filters.
Objects
Objects tell Liquid where to show content on a page. Objects and variable names are denoted by double curly braces: {{ and }}.
{{ page.title }}Introduktion
Tags
Tags create the logic and control flow for templates. They are denoted by curly braces and percent signs: {% and %}.
{% if user %} Hello {{ user.name }}! {% endif %}Hello Adam!
Filters
Filters change the output of a Liquid object. They are used within an output and are separated by a |.
{{ "/my/fancy/url" | append: ".html" }}/my/fancy/url.html
Multiple filters can be used on one output. They are applied from left to right.
{{ "adam!" | capitalize | prepend: "Hello " }}Hello Adam!Updated: 2020-08-11