From c1cd6f08acd42342756ecd8399046d44aca08d3d Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 31 Jul 2014 12:39:58 -0400 Subject: [PATCH] jsonify licenses.json --- licenses.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/licenses.json b/licenses.json index f8e1a6a..fbcec63 100644 --- a/licenses.json +++ b/licenses.json @@ -1,8 +1,3 @@ --- -comment: \ - because the for loop is being filtered by layout, the normal rindex0 check - 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. --- -{% assign count = 0 %}{% for page in site.pages %}{% if page.layout == "license" %}{% assign count = count | plus: 1 %}{% endif %}{% endfor %}{% assign i = 0 %} -[{% for page in site.pages %}{% if page.layout == "license" %}{{ page | jsonify }}{% assign i = i | plus: 1 %}{% if i < count %},{% endif %}{% endif %}{% endfor %}] +{{ site.licensees | jsonify }}