-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsitemap.xml
More file actions
26 lines (23 loc) · 986 Bytes
/
sitemap.xml
File metadata and controls
26 lines (23 loc) · 986 Bytes
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
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% assign redirect_links = site.pages | concat: site.posts | map: 'redirect_from' | compact | flatten %}
{% for page in site.pages %}
{% if page.url contains '.html' or page.url contains '/' %}
{% unless redirect_links contains page.url or page.sitemap_exclude or page.url contains '404.html' or page.url contains '.xml' or page.url contains '.css'%}
<url>
<loc>{{ site.url }}{{ page.url | remove: 'index.html' | remove: '.html' }}</loc>
<lastmod>{{ page.date-modified | default: site.default-date-modified | date: '%Y-%m-%d' }}</lastmod>
</url>
{% endunless %}
{% endif %}
{% endfor %}
{% for post in site.posts %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
<lastmod>{{ post.date-modified | default: post.date | date: '%Y-%m-%d' }}</lastmod>
</url>
{% endfor %}
</urlset>