From f284b9ad986a33e4121eb40a0fb3106ac052a984 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Wed, 4 Nov 2026 19:08:41 +0100 Subject: Add XML sitemap generation This adds a sitemap template that recursively lists site pages and their URLs, with child pages sorted by path for consistent output. It also registers `/sitemap.xml` as a non-discoverable Lektor page and advertises the sitemap in the site's document head. --- content/sitemap.xml/contents.lr | 5 +++++ templates/base.html | 4 ++++ templates/sitemap.xml | 7 +++++++ 3 files changed, 16 insertions(+) create mode 100644 content/sitemap.xml/contents.lr create mode 100644 templates/sitemap.xml diff --git a/content/sitemap.xml/contents.lr b/content/sitemap.xml/contents.lr new file mode 100644 index 0000000..e89ddb7 --- /dev/null +++ b/content/sitemap.xml/contents.lr @@ -0,0 +1,5 @@ +_template: sitemap.xml +--- +_model: none +--- +_discoverable: no diff --git a/templates/base.html b/templates/base.html index ddcaa60..ab98d2e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -122,6 +122,10 @@ sizes="32x32" href="{{ '/static/images/favicon.png' | asseturl }}"> + {% endblock meta_links %}