--- permalink: /assets/search_data.json --- [ {% capture nooutput %} The increment command outputs the current value of the counter, so we ignore output by surrounding all increment statements in capture groups. {% increment i %} {% increment page_count %} {% assign pages = site.html_pages | concat: site.posts | where: "noindex", nil %} {% for pg in pages %} {% increment page_count %} {% endfor %} {% endcapture %} {% for current_page in pages %} { "title": {{ current_page.title | jsonify }}, "url": {{ current_page.url | absolute_url | jsonify }}, "content": {{ current_page.content | jsonify }} {% capture nooutput %} {% increment i %} {% endcapture %} {% if i == page_count %} } {% else %} }, {% endif %} {% endfor %} ] {% comment %} vim: set syntax=off : {% endcomment %}