Move sitemap from html to njk to avoid typeerror on build

This commit is contained in:
2021-07-10 12:22:39 -04:00
parent e913efcbf8
commit 69309bccc0

16
src/sitemap.njk Normal file
View File

@@ -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 }}</lastmod>
<changefreq>{{page.data.changeFreq}}</changefreq>
</url>
{% endif %}
{% endfor %}
</urlset>