From 1c4c99f0c19f19424e3aee04e868c38333164dd9 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Sun, 24 Dec 2023 08:13:33 +0000 Subject: Generate sitemap.xml, robots.txt --- src/pages/robots.njk | 7 +++++++ src/pages/sitemap.njk | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/pages/robots.njk create mode 100644 src/pages/sitemap.njk (limited to 'src/pages') diff --git a/src/pages/robots.njk b/src/pages/robots.njk new file mode 100644 index 0000000..efb8b84 --- /dev/null +++ b/src/pages/robots.njk @@ -0,0 +1,7 @@ +--- +eleventyExcludeFromCollections: true +permalink: /robots.txt +--- +User-agent: * +Allow: / +Sitemap: {{ site.url }}/sitemap.xml \ No newline at end of file diff --git a/src/pages/sitemap.njk b/src/pages/sitemap.njk new file mode 100644 index 0000000..455c26b --- /dev/null +++ b/src/pages/sitemap.njk @@ -0,0 +1,15 @@ +--- +eleventyExcludeFromCollections: true +permalink: /sitemap.xml +--- + + +{% for item in collections.all %} + + {{ site.url }}{{ item.url }} + {{ item.date | formatDate }} + {{ item.data.sitemapChangefreq | default("monthly") }} + {{ item.data.sitemapPriority | default(0.8) }} + +{% endfor %} + \ No newline at end of file -- cgit