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:
@ -13,7 +13,8 @@ search: exclude
|
|||||||
"keywords": "{{page.keywords}}",
|
"keywords": "{{page.keywords}}",
|
||||||
"url": "{{ page.url | remove: "/"}}",
|
"url": "{{ page.url | remove: "/"}}",
|
||||||
"summary": "{{page.summary | strip }}"
|
"summary": "{{page.summary | strip }}"
|
||||||
},
|
}
|
||||||
|
{% unless forloop.last and site.posts.size < 1 %},{% endunless %}
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
@ -29,4 +30,4 @@ search: exclude
|
|||||||
{% unless forloop.last %},{% endunless %}
|
{% unless forloop.last %},{% endunless %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user