I'm having some jekyll issues. I'm trying to create a for loop, and it's working on one page but not on another.
this is my html (on index.html)
<div class="grid">
{% for info in site.data.home %}
<div class="unit unit-xs-1 unit-s-1 unit-m-1-2 unit-l-1-4 unit-xl-1-4">
<h4>{{home.title}}</h4>
<p>{{home.text}}</p>
</div>
{% endfor %}
</div>
And I've created home.yml in my _data file, and added markdown in there. It's all setup exactly the same as our species.html page which is working perfectly. Any ideas as to why this isn't populating?
In the for loop line there's a variable named info, but inside the loop the code is referring to a variable named home, which doesn't exist: it should be {{info.title}}, etc.
Hi @thomasjbradley,
I'm having some jekyll issues. I'm trying to create a for loop, and it's working on one page but not on another.
this is my html (on index.html)
And I've created home.yml in my _data file, and added markdown in there. It's all setup exactly the same as our species.html page which is working perfectly. Any ideas as to why this isn't populating?
Thanks!
V