Skip to content

Commit 42708ae

Browse files
committed
Create sitemap.xml
1 parent 9af8c4d commit 42708ae

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

sitemap.xml

+28
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="http://www.sitemaps.org/schemas/sitemap/0.9">
6+
{%- for post in site.posts -%}
7+
{%- unless post.published == false -%}
8+
<url>
9+
<loc>{{ site.url }}{{ post.url }}</loc>
10+
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
11+
<changefreq>monthly</changefreq>
12+
<priority>0.5</priority>
13+
</url>
14+
{%- endunless -%}
15+
{%- endfor -%}
16+
{%- for page in site.pages -%}
17+
<url>
18+
<loc>{{ site.url }}{{ page.url | remove: "index.html" }}</loc>
19+
{%- if page.date -%}
20+
<lastmod>{{ page.date | date_to_xmlschema }}</lastmod>
21+
{%- else -%}
22+
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
23+
{%- endif -%}
24+
<changefreq>monthly</changefreq>
25+
<priority>0.5</priority>
26+
</url>
27+
{%- endfor -%}
28+
</urlset>

0 commit comments

Comments
 (0)