{% capture site_url %}{% if site.url %}{{ site.url | append: site.baseurl }}{% else %}{{ site.github.url }}{% endif %}{% endcapture %} {% for post in site.posts %}{% unless post.sitemap == false %} {{ post.url | prepend: site_url }} {% if post.last_modified_at %} {{ post.last_modified_at | date_to_xmlschema }} {% else %} {{ post.date | date_to_xmlschema }} {% endif %} {% endunless %}{% endfor %} {% for page in site.html_pages %}{% unless page.sitemap == false %} {{ page.url | replace:'/index.html','/' | prepend: site_url }} {% if page.last_modified_at %} {{ page.last_modified_at | date_to_xmlschema }} {% endif %} {% endunless %}{% endfor %} {% for collection in site.collections %}{% unless collection.last.output == false %} {% for doc in collection.last.docs %}{% unless doc.sitemap == false %} {{ doc.url | replace:'/index.html','/' | prepend: site_url }} {% if doc.last_modified_at %} {{ doc.last_modified_at | date_to_xmlschema }} {% endif %} {% endunless %}{% endfor %} {% endunless %}{% endfor %} {% for file in site.html_files %} {{ file.path | prepend: site_url }} {{ file.modified_time | date_to_xmlschema }} {% endfor %}