feat: add sitemap template

Needs to be in Nunjucks because WebC does not output valid XML
This commit is contained in:
Sebin Nyshkim 2025-07-14 16:08:15 +02:00
parent b86905a8fd
commit e101c95588
Signed by: SebinNyshkim
SSH key fingerprint: SHA256:LG1WHMySL/4iW/Yci+0eHgbf0te5beRiLlmyoY8E5D0

14
src/sitemap.njk Normal file
View file

@ -0,0 +1,14 @@
---
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 %}
<url>
<loc>{{ base }}{{ page.url | url }}</loc>
<lastmod>{{ page.date.toISOString() }}</lastmod>
<changefreq>{{ page.data.changeFreq if page.data.changeFreq else "monthly" }}</changefreq>
</url>
{% endfor %}
</urlset>