Skip to content

Commit

Permalink
add sitemap xml
Browse files Browse the repository at this point in the history
  • Loading branch information
uuupah committed Mar 17, 2024
1 parent 80db650 commit bc10887
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Sitemap: https://www.belter.io/sitemap.xml

User-agent: GPTBot
User-agent: ChatGPT-User
User-agent: Google-Extended
Expand Down
16 changes: 16 additions & 0 deletions src/sitemap.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
permalink: /sitemap.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in collections.all %}
{% if not page.data.draft %}
<url>
<loc>{{ site.url }}{{ page.url | url }}</loc>
<lastmod>{{ page.date.toISOString() }}</lastmod>
<changefreq>{{ page.data.changeFreq if page.data.changeFreq else "monthly" }}</changefreq>
</url>
{% endif %}
{% endfor %}
</urlset>

0 comments on commit bc10887

Please sign in to comment.