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