Skip to content

Commit e05ee0d

Browse files
authored
Merge pull request #55 from microsoft/adilei
custom sitemap
2 parents 02e59ec + f1569de commit e05ee0d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

sitemap.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: null
3+
---
4+
<?xml version="1.0" encoding="UTF-8"?>
5+
<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">
6+
{% for post in site.posts %}
7+
<url>
8+
<loc>{{ site.url }}{{ post.url }}</loc>
9+
{% if post.lastmod == null %}
10+
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
11+
{% else %}
12+
<lastmod>{{ post.lastmod | date_to_xmlschema }}</lastmod>
13+
{% endif %}
14+
15+
{% if post.sitemap.changefreq == null %}
16+
<changefreq>weekly</changefreq>
17+
{% else %}
18+
<changefreq>{{ post.sitemap.changefreq }}</changefreq>
19+
{% endif %}
20+
21+
{% if post.sitemap.priority == null %}
22+
<priority>0.5</priority>
23+
{% else %}
24+
<priority>{{ post.sitemap.priority }}</priority>
25+
{% endif %}
26+
</url>
27+
{% endfor %}
28+
</urlset>

0 commit comments

Comments
 (0)