From 5181f8ab4c2eec68384995fdde22109d2a1815e4 Mon Sep 17 00:00:00 2001 From: atomicules Date: Mon, 7 Nov 2016 22:44:31 +0000 Subject: [PATCH] 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. --- search.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/search.json b/search.json index 348c498..b61ffb7 100644 --- a/search.json +++ b/search.json @@ -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 %} -] \ No newline at end of file +]