---
permalink: sitemap.xml
sitemap_exclude: 'yes'
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
  {% for page in site.pages %}
    {% unless page.sitemap_exclude == "yes" %}
    <url>
      <loc>{{ site.url }}{{ page.url | remove:'index.html' }}</loc>
      
      {% if page.sitemap.lastmod %}
        <lastmod>{{ page.sitemap.lastmod | date: "%Y-%m-%d" }}</lastmod>
      {% elsif page.date %}
        <lastmod>{{ page.date | date_to_xmlschema }}</lastmod>
      {% else %}
        <lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
      {% endif %}

      {% if page.sitemap.changefreq %}
        <changefreq>{{ page.sitemap.changefreq }}</changefreq>
      {% else %}
        <changefreq>weekly</changefreq>
      {% endif %}

      {% if page.sitemap.priority %}
        <priority>{{ page.sitemap.priority }}</priority>
      {% else %}
        <priority>0.3</priority>
      {% endif %}
      
    </url>
    {% endunless %}
  {% endfor %}

  {% for collection in site.collections %}
  {% assign docs = collection.docs %}
  {% for doc in docs %}
    <url>
       <loc>{{ site.url }}{{ doc.url | remove:'index.html' }}</loc>
      {% if doc.sitemap.lastmod %}
        <lastmod>{{ doc.sitemap.lastmod | date: "%Y-%m-%d" }}</lastmod>
      {% elsif doc.date %}
        <lastmod>{{ doc.date | date_to_xmlschema }}</lastmod>
      {% else %}
        <lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
      {% endif %}

      {% if doc.sitemap.changefreq %}
        <changefreq>{{ doc.sitemap.changefreq }}</changefreq>
      {% else %}
        <changefreq>weekly</changefreq>
      {% endif %}

      {% if doc.sitemap.priority %}
        <priority>{{ doc.sitemap.priority }}</priority>
      {% else %}
        <priority>0.3</priority>
      {% endif %}
    </url>
    {% endfor %}
    {% endfor %}
</urlset>