fix: sitemap

This commit is contained in:
Cory Dransfeldt 2024-02-17 10:14:49 -08:00
parent 968d5ab11f
commit b3f665b2d2
No known key found for this signature in database
3 changed files with 13 additions and 11 deletions

View file

@ -2,13 +2,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 %}
<url>
<loc>{{ meta.url }}{{ page.url | url }}</loc>
<lastmod>{{ page.date }}</lastmod>
<changefreq>{{page.data.changeFreq}}</changefreq>
</url>
{% if not page.data.draft %}
<url>
<loc>{{ meta.url }}{{ page.url }}</loc>
<lastmod>{{ page.date | isoDateOnly }}</lastmod>
<changefreq>{%- if page.data.changeFreq -%}{{ page.data.changeFreq }}{%- else -%}monthly{%- endif -%}</changefreq>
<priority>{%- if page.data.priority -%}{{ page.data.priority }}{%- else -%}0.5{%- endif %}</priority>
</url>
{% endif %}
{% endfor %}
</urlset>
</urlset>