--- layout: compress # The Sitemap template # v2.0 # https://github.com/cotes2020/jekyll-theme-chirpy # © 2017-2019 Cotes Chung # MIT License --- {% for post in site.posts %} {{ site.url | append: site.baseurl | append: post.url }} {% if post.lastmod %} {{ post.lastmod | date_to_xmlschema }} {% else %} {{ post.date | date_to_xmlschema }} {% endif %} {% if post.sitemap.changefreq %} {{ post.sitemap.changefreq }} {% else %} monthly {% endif %} {% if post.sitemap.priority %} {{ post.sitemap.priority }} {% else %} 0.5 {% endif %} {% endfor %} {% for page in site.pages %} {% assign pass = false %} {% for fuzzy in site.sitemap_exclude.fuzzy %} {% if page.url contains fuzzy %} {% assign pass = true %} {% break %} {% endif %} {% endfor %} {% unless pass %} {% for accurate in site.sitemap_exclude.accurate %} {% assign len = accurate | size %} {% capture beg %}{{ 0 | minus: len }}{% endcapture %} {% capture tail %}{{ page.url | slice: beg, len }}{% endcapture %} {% if tail == accurate %} {% assign pass = true %} {% break %} {% endif %} {% endfor %} {% endunless %} {% if pass %} {% continue %} {% endif %} {{ site.url | append: site.baseurl | append: page.url | remove: "index.html" }} {{ site.time | date_to_xmlschema }} {% if page.sitemap.changefreq %} {{ page.sitemap.changefreq }} {% else %} monthly {% endif %} {% if page.sitemap.priority %} {{ page.sitemap.priority }} {% else %} 0.3 {% endif %} {% endfor %}