I am trying to use a loop over a Data File with Jekyll. The code I have is as follows:
<div class="row">
<div class="12 columns">
<ul class="clearing-thumbs" data-clearing>
{% for photo in site.data.unusable_photos %}
<li><a href="{{ photo.path }}" class="th"><img class="album-photo" data-caption="{{ photo.caption }}" src="{{ photo.thumb }}"></a></li>
{% endfor %}
</ul>
</div>
</div>
However, it's getting hard to manually generate thumbnails for every photo I have. I found the Jekyll plugin thumbnail, but I don't know how to make it fit my needs.
The README shows this example: {% thumbnail /path/to/local/image.png 50x50< %}
.
How can I use the {{ photo.path }}
with the Jekyll plugin, so that I don't have to manually type filenames?
EDIT: Maybe I can edit the plugin so it can access the site variable?
look_up
. github.com/kevin1/jekyll-thumbnailer/blob/master/thumbnail.rb – Kevin Chen