-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsitemap.xml
More file actions
42 lines (37 loc) · 1.19 KB
/
Copy pathsitemap.xml
File metadata and controls
42 lines (37 loc) · 1.19 KB
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
33
34
35
36
37
38
39
40
41
42
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- comment -%}
Listing pages change whenever a post is published, so their lastmod
is the newest post's date. About and linkfarm have no meaningful
modification date, so they carry none rather than a misleading
build time.
{%- endcomment -%}
{%- assign latest = site.posts.first %}
<url>
<loc>{{ site.url }}</loc>
<lastmod>{{ latest.date | date_to_xmlschema }}</lastmod>
</url>
<url>
<loc>{{ "/archive/" | prepend: site.url }}</loc>
<lastmod>{{ latest.date | date_to_xmlschema }}</lastmod>
</url>
<url>
<loc>{{ "/tags/" | prepend: site.url }}</loc>
<lastmod>{{ latest.date | date_to_xmlschema }}</lastmod>
</url>
<url>
<loc>{{ "/about/" | prepend: site.url }}</loc>
</url>
<url>
<loc>{{ "/linkfarm/" | prepend: site.url }}</loc>
</url>
{% for post in site.posts %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
<lastmod>{{ post.last_modified_at | default: post.date | date_to_xmlschema }}</lastmod>
</url>
{% endfor %}
</urlset>