{% comment %} Generates a list of people. Expects 'people' as an argument, representing the list of people to show. {% endcomment %} {% for role in site.roles %} {% assign rollers = people | where: "role", role.id %} {% if rollers.size > 0 %} <ul class="collection with-header"> <li class="collection-header"><h4>{{role.name}}</h4></li> {% for person in rollers %} <li class="collection-item avatar"> <img src="/{{person.pic}}" alt="" class="circle"/> <a href="{{person.url}}" class="title">{{person.fullname}}</a> <p> {% if person.start_date %} from {{person.start_date}} <br/> {% endif %} {% if person.end_date %} until {{person.end_date}} <br/> {% endif %} </p> </li> {% endfor %} </ul> {% endif %} {% endfor %}