Tags » liquid
-
TIL: How to shuffle an array in a Jekyll template
If you want an array in random order, you can use the
sample
filter to get a random sample of the same size as the original array. -
TIL: Use the
{% raw %}
tag to describe Liquid in LiquidIf you’re trying to write about using Liquid tags in a Liquid-based site, wrapping your tags in the
{% raw %}
tag will prevent them being rendered. -
TIL: Use the
{% capture %}
tag to assign complex strings to variablesIf you want to get a string that’s semi-complicated to construct, you can put a “mini-template” in the
{% capture %}
tag to build it over multiple lines.