{%- macro render_archives(archives, max=0) -%} {%- for archive in archives -%} {%- if max > 0 and loop.index > max -%} {%- break -%} {%- endif -%}