{% for url in urls %} {% if 'https' in url.loc %} {{ url.loc }} {% elseif url.loc|replace({hostname: ''}) == url.loc %} {{ hostname }}{{ url.loc }} {% else %} {{ url.loc }} {% endif %} {% if url.lastmod is defined %} {{ url.lastmod }} {% endif %} {% if url.photo is defined %} {{ hostname }}{{ url.photo }} {{ url.name }} {% endif %} {% endfor %}