Skip to content

Instantly share code, notes, and snippets.

@parkr
Last active December 28, 2015 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parkr/7420169 to your computer and use it in GitHub Desktop.
Save parkr/7420169 to your computer and use it in GitHub Desktop.
liquid for loop of arbitrary values
<!-- liquid v 2.5.4 -->
{% assign my_array = "1,2,3,4,5" | split:"," %}
{% for item in my_array %}
{{item}}
{% endfor %}
<!-- or -->
{% for item in (1..5) %}
{{item}}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment