{% macro collection_links(collection, separator=', ') %} {% for url, anchor in collection %} {{ anchor }}{% if not loop.last %}{{ separator }}{% endif %} {% endfor %} {% endmacro %}