uoft-lgcu / lgcu.ca

LGCU website
https://lgcu.ca
2 stars 0 forks source link

use iteration in committees.md #21

Closed gadanidis closed 3 years ago

gadanidis commented 3 years ago

For committees that have an arbitrarily-long amount of members, we can format it as a list and use a for-loop to iterate through that list and print out all the names, rather than encoding a specific number of members into the data file. This should make it much easier to update the committees, as well as reduce the amount of code needed in the markdown. I can implement this, I'm just making the issue so I remember to finish doing it.

{% assign length = site.data.committees.twpl_editors.size %}
{% for editor in site.data.committees.twpl_editors %} {% assign length = length | minus: 1 %} [{{editor.name}}](https://www.linguistics.utoronto.ca/people/directories/graduate-students/{{editor.fullname | slugify}} "Department directory entry for {{editor.name}}"){% if length != 0 %},{% endif %}
{% endfor %}