Filters
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 |
.
Input
{{ "/my/fancy/url" | append: ".html" }}
Output
/my/fancy/url.html
Multiple filters can be used on one output, and are applied from left to right.
Input
{{ "adam!" | capitalize | prepend: "Hello " }}
Output
Hello Adam!
Last updated