refactor: ♻️ use custom sitemap generation instead of package

This commit is contained in:
Sebin Nyshkim 2024-10-15 04:18:50 +02:00
parent f7e0e51bc6
commit f8b97f7649
2 changed files with 12 additions and 8 deletions

View file

@ -1,6 +1,16 @@
---
permalink: /sitemap.xml
layout: null
eleventyExcludeFromCollections: true
---
{# {% sitemap collections.all %} #}
<?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 | isoDate }}</lastmod>
<changefreq>{{ page.data.changeFreq if page.data.changeFreq else "monthly" }}</changefreq>
</url>
{% endif %}
{% endfor %}
</urlset>