vivkay / ffi

Redesign of Fauna & Flora nonprofit website
http://vivkay.github.io/ffi
0 stars 0 forks source link

jekyll not working #5

Closed vivkay closed 8 years ago

vivkay commented 8 years ago

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)

<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?

Thanks!

V

thomasjbradley commented 8 years ago

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.

vivkay commented 8 years ago

Thanks!