feat: ✨ add sitemap template
Needs to be in Nunjucks because WebC does not output valid XML
This commit is contained in:
parent
b86905a8fd
commit
e101c95588
1 changed files with 14 additions and 0 deletions
14
src/sitemap.njk
Normal file
14
src/sitemap.njk
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue