{% for url in urls %} {% if url.loc|replace({hostname: ''}) == url.loc %} {{ hostname }}{{ url.loc }} {% else %} {{ url.loc }} {% endif %} {% if url.lastmod is defined %} {{ url.lastmod }} {% endif %} {% if url.image is defined and url.image is not empty %} {% if url.image.loc|replace({hostname: ''}) == url.image.loc %} {{ hostname }}{{ url.image.loc }} {% else %} {{ url.image.loc }} {% endif %} {{ url.image.title }} {% endif %} {% endfor %}