Jekyll output collection list organized by tag -
i'm having trouble grouping items tags in collection. i've managed site.categories (check bellow), i'm having trouble fecthing yaml attributes collection items in same way.
{% imagens in site.imagens %} <div class="card"> <ul class="lista-imagens"> <li><a class="categories" name="{{ imagens.tags | first }}">{ {{ imagens.tags | first }} }</a> <ul > <li> <img src="{{ imagens.image_path }}" alt="{{ imagens.title }}"> <a href="{{ imagens.original_path }}" target="_blank">{{ imagens.title }}</a> <span class="ano">{{ imagens.year }}</span> </li> </ul> </li> </ul> </div> {% endfor %} {% category in site.categories %} <div class="col-md-3"> <ul class="listinha"> <li><a class="categories" name="{{ category | first }}">{ {{ category | first }} }</a> <ul > {% posts in category %} {% post in posts %} <li><a href="{{ post.url }}">{{ post.title }}</a> <br> <span class="autor"> {{ post.author }} {% if post.year %}<br> {{ post.year }} {% endif %} </span><span class="contributor">{{ post.contributor }} <!-- / imgs: {{ post.imgs }}<br>--></span></li> {% endfor %} {% endfor %} </ul> </li> </ul> </div> {% endfor %}
Comments
Post a Comment