-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsitemap.xml
28 lines (23 loc) · 860 Bytes
/
sitemap.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
layout: none
title: Sitemap Index
sitemap:
exclude: true
---
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- assign pages = site.pages | where_exp: "page", "page.locale_reference == 'sitemap_index' or page.locale_reference == 'sitemap_news' or page.locale_reference == 'sitemap_videos'" -%}
{%- for page in pages %}
<sitemap>
<loc>{{ page.url | remove: 'index.html' | absolute_url }}</loc>
{%- if page.sitemap.lastmod %}
{%- assign lastmod = page.sitemap.lastmod | date: '%Y-%m-%d' %}
{%- elsif page.date %}
{%- assign lastmod = page.date | date_to_xmlschema %}
{%- else %}
{%- assign lastmod = site.time | date_to_xmlschema %}
{%- endif %}
<lastmod>{{ lastmod }}</lastmod>
</sitemap>
{%- endfor %}
</sitemapindex>