aboutsummaryrefslogtreecommitdiffstats
path: root/src/sitemap.xml.njk
diff options
context:
space:
mode:
Diffstat (limited to 'src/sitemap.xml.njk')
-rw-r--r--src/sitemap.xml.njk16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sitemap.xml.njk b/src/sitemap.xml.njk
new file mode 100644
index 0000000..5448d77
--- /dev/null
+++ b/src/sitemap.xml.njk
@@ -0,0 +1,16 @@
+---json
+{
+ "permalink": "/sitemap.xml",
+ "eleventyExcludeFromCollections": true
+}
+---
+<?xml version="1.0" encoding="utf-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+{%- for page in collections.all %}
+ {% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
+ <url>
+ <loc>{{ absoluteUrl }}</loc>
+ <lastmod>{{ page.date | htmlDateString }}</lastmod>
+ </url>
+{%- endfor %}
+</urlset>