{% macro header(size, text, tocList) %} {% set tocList = (tocList.push([size, text]), tocList) %} <{{ size }}> {{ text }} {% endmacro %} {% macro generate(tocList) %} {% for size, text in tocList %} {{ text }} {% endfor %} {% endmacro %}