{%- macro expandURL(url) -%} {%- if url.startswith(('https://', 'http://')) -%} {{ url }} {%- else -%} {{ pathto(url) }} {%- endif -%} {%- endmacro -%}