Skip to content

Instantly share code, notes, and snippets.

@parkr
Last active December 28, 2015 01:19
Show Gist options
  • Select an option

  • Save parkr/7420169 to your computer and use it in GitHub Desktop.

Select an option

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