-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsitemap_template.xml
More file actions
32 lines (29 loc) · 897 Bytes
/
sitemap_template.xml
File metadata and controls
32 lines (29 loc) · 897 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
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in posts %}
<url>
<loc>{{ post.permalink | uriencode }}</loc>
{% if post.updated %}
<lastmod>{{ post.updated.toISOString().substring(0, 10) }}</lastmod>
{% elif post.date %}
<lastmod>{{ post.date.toISOString().substring(0, 10) }}</lastmod>
{% endif %}
</url>
{% endfor %}
<url>
<loc>{{ config.url | uriencode }}</loc>
<lastmod>{{ sNow.toISOString().substring(0, 10) }}</lastmod>
</url>
{% for tag in tags %}
<url>
<loc>{{ tag.permalink | uriencode }}</loc>
<lastmod>{{ sNow.toISOString().substring(0, 10) }}</lastmod>
</url>
{% endfor %}
{% for cat in categories %}
<url>
<loc>{{ cat.permalink | uriencode }}</loc>
<lastmod>{{ sNow.toISOString().substring(0, 10) }}</lastmod>
</url>
{% endfor %}
</urlset>