I recently had a nightmare figuring out that Jekyll custom collections cannot be named documents
. Sigh.
The following snippet helped diagnose the problem:
<pre id="jekyll-debug"></pre>
<script>
var obj = JSON.parse(decodeURIComponent("{{ site | jsonify | url_encode }}"));
var prettyJson = JSON.stringify(obj, null, 4); // Pretty-printed JSON (indented 4 spaces).
document.getElementById("jekyll-debug").textContent = prettyJson;
</script>
Credit to Flux on StackOverflow