Repository navigation
Expand file tree
/
Copy pathsitemap.xml
More file actions
42 lines (37 loc) · 1.36 KB
/
Copy pathsitemap.xml
File metadata and controls
42 lines (37 loc) · 1.36 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">
{% assign latest_post = site.posts | first %}
{% assign homepage_last_modified = latest_post.seo.date_modified | default: latest_post.modified_date | default: latest_post.lastmod | default: latest_post.date %}
<url>
<loc>{{ '/' | absolute_url }}</loc>
<lastmod>{{ homepage_last_modified | date_to_xmlschema }}</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>{{ '/about/' | absolute_url }}</loc>
<lastmod>2023-10-12T12:06:00+09:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
{% for post in site.posts %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
{% assign last_modified = post.seo.date_modified | default: post.modified_date | default: post.lastmod | default: post.date %}
<lastmod>{{ last_modified | date_to_xmlschema }}</lastmod>
{% if post.sitemap.changefreq == null %}
<changefreq>weekly</changefreq>
{% else %}
<changefreq>{{ post.sitemap.changefreq }}</changefreq>
{% endif %}
{% if post.sitemap.priority == null %}
<priority>0.5</priority>
{% else %}
<priority>{{ post.sitemap.priority }}</priority>
{% endif %}
</url>
{% endfor %}
</urlset>