How get ints in Jekyll? -
i trying make blog , want make id tags correspond each time loop runs (e.g. #section_1, #section_2,#section_(insert variable) ).
is there way in jekyll?
this should produce you're looking for:
{% assign indices = "1|2|3" | split: "|" %} {% index in indices %} <div id="{{ index }}">this div {{ index }}</div> {% endfor %}
you'll have know in advance how many sections want created, , add each id 1|2|3
bit in first line.
Comments
Post a Comment