unless forloop for comma was missing from site.pages in search.json

If the site has only pages this results in invalid json as there will be a trailing comma.
This commit is contained in:
atomicules 2016-11-07 22:44:31 +00:00 committed by atomicules
parent c9ad9bf8da
commit 5181f8ab4c

View File

@ -13,7 +13,8 @@ search: exclude
"keywords": "{{page.keywords}}",
"url": "{{ page.url | remove: "/"}}",
"summary": "{{page.summary | strip }}"
},
}
{% unless forloop.last and site.posts.size < 1 %},{% endunless %}
{% endunless %}
{% endfor %}
@ -29,4 +30,4 @@ search: exclude
{% unless forloop.last %},{% endunless %}
{% endfor %}
]
]