1+ ---
2+ layout: compress
3+ ---
4+ <?xml version =" 1.0" encoding =" UTF-8" ?>
5+ {% if page.xsl %}
6+ <?xml-stylesheet type =" text/xsl" href =" {{ " /sitemap.xsl" | absolute_url }}" ?>
7+ {% endif %}
8+ <urlset xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns =" http://www.sitemaps.org/schemas/sitemap/0.9" >
9+ {% assign collections = site.collections | where_exp:'collection','collection.output != false' %}
10+ {% for collection in collections %}
11+ {% assign docs = collection.docs | where_exp:'doc','doc.sitemap != false' %}
12+ {% for doc in docs %}
13+ <url >
14+ <loc >{{ doc.url | replace:'/index.html','/' | absolute_url | xml_escape }}</loc >
15+ {% if doc.last_modified_at or doc.date %}
16+ <lastmod >{{ doc.last_modified_at | default: doc.date | date_to_xmlschema }}</lastmod >
17+ {% endif %}
18+ </url >
19+ {% endfor %}
20+ {% endfor %}
21+
22+ {% assign pages = site.html_pages | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/404.html"' %}
23+ {% for page in pages %}
24+ <url >
25+ <loc >{{ page.url | replace:'/index.html','/' | absolute_url | xml_escape }}</loc >
26+ {% if page.last_modified_at %}
27+ <lastmod >{{ page.last_modified_at | date_to_xmlschema }}</lastmod >
28+ {% endif %}
29+ </url >
30+ {% endfor %}
31+
32+ {% assign static_files = page.static_files | where_exp:'page','page.sitemap != false' | where_exp:'page','page.name != "404.html"' %}
33+ {% for file in static_files %}
34+ <url >
35+ <loc >{{ file.path | replace:'/index.html','/' | absolute_url | xml_escape }}</loc >
36+ <lastmod >{{ file.modified_time | date_to_xmlschema }}</lastmod >
37+ </url >
38+ {% endfor %}
39+
40+ {% for subsite in site.data.sitemap.subsites %}
41+ <url >
42+ <loc >{{ site.url | absolute_url | xml_escape }}/{{ subsite | xml_escape}}/</loc >
43+ </url >
44+ {% endfor %}
45+
46+ </urlset >
0 commit comments