Skip to content

Commit a9f84fd

Browse files
committed
chore: add sitemap.xml & robots.txt
1 parent bc5af71 commit a9f84fd

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
User-agent: *
2+
Allow: /
3+
Sitemap: https://bits-bytes-nn.github.io/sitemap.xml

sitemap.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: null
3+
---
4+
5+
<?xml version="1.0" encoding="UTF-8"?>
6+
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
8+
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
9+
{% for post in site.posts %}
10+
<url>
11+
<loc>{{ site.url }}{{ post.url }}</loc>
12+
{% if post.lastmod == null %}
13+
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
14+
{% else %}
15+
<lastmod>{{ post.lastmod | date_to_xmlschema }}</lastmod>
16+
{% endif %}
17+
18+
{% if post.sitemap.changefreq == null %}
19+
<changefreq>weekly</changefreq>
20+
{% else %}
21+
<changefreq>{{ post.sitemap.changefreq }}</changefreq>
22+
{% endif %}
23+
24+
{% if post.sitemap.priority == null %}
25+
<priority>0.5</priority>
26+
{% else %}
27+
<priority>{{ post.sitemap.priority }}</priority>
28+
{% endif %}
29+
30+
</url>
31+
{% endfor %}
32+
</urlset>

0 commit comments

Comments
 (0)