{%- capture out -%} {%- for i in include.list -%} , {{ i.name }} {%- endfor -%} {%- endcapture -%} {{ out | remove_first: ", " | trim }}