From 92fe7c5c2487381da8238cff2eab98414fb9acc4 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 15 Feb 2021 00:35:18 +0100 Subject: [PATCH] Add sitemap.xml generator --- content/sitemap.xml/contents.lr | 4 ++++ templates/sitemap.xml | 9 +++++++++ 2 files changed, 13 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..ffd5fad --- /dev/null +++ b/content/sitemap.xml/contents.lr @@ -0,0 +1,4 @@ +_template: sitemap.xml +--- +_model: none +_discoverable: no diff --git a/templates/sitemap.xml b/templates/sitemap.xml new file mode 100644 index 0000000..0c524e8 --- /dev/null +++ b/templates/sitemap.xml @@ -0,0 +1,9 @@ + + + {%- for page in [site.root] if page != this recursive %} + {%- if not page.hide_from_global_index %} + {{ page|url(external=true) }} + {{- loop(page.children) }} + {%- endif %} + {%- endfor %} +