2013-07-16 11:28:32 -04:00
|
|
|
---
|
|
|
|
comment: \
|
2013-10-30 19:10:25 +02:00
|
|
|
because the for loop is being filtered by layout, the normal rindex0 check
|
2013-07-16 11:33:33 -04:00
|
|
|
for the trailing comma doesn't work. Count the number of licenses and manually
|
|
|
|
increment an index to see if we're on the true last iteration.
|
2013-07-16 11:28:32 -04:00
|
|
|
---
|
|
|
|
{% assign count = 0 %}{% for page in site.pages %}{% if page.layout == "license" %}{% assign count = count | plus: 1 %}{% endif %}{% endfor %}{% assign i = 0 %}
|
2014-06-17 11:41:40 -04:00
|
|
|
[{% for page in site.pages %}{% if page.layout == "license" %}{{ page | jsonify }}{% assign i = i | plus: 1 %}{% if i < count %},{% endif %}{% endif %}{% endfor %}]
|