From b0bc736a7e34e8417c72aeb6c69ebbb8401f3d76 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Tue, 28 Nov 2023 20:52:20 +0000 Subject: [PATCH] Add sitemap --- src/robots.txt | 2 ++ src/sitemap.njk | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/sitemap.njk diff --git a/src/robots.txt b/src/robots.txt index ef0608f..4f00592 100644 --- a/src/robots.txt +++ b/src/robots.txt @@ -1,3 +1,5 @@ +Sitemap: https://lewisdale.dev/sitemap.xml + User-Agent: Bytespider Disallow: / diff --git a/src/sitemap.njk b/src/sitemap.njk new file mode 100644 index 0000000..07e4f9b --- /dev/null +++ b/src/sitemap.njk @@ -0,0 +1,34 @@ +--- +permalink: /sitemap.xml +--- + + + + https://{{ metadata.site.domain }}/ + 1.0 + + + https://{{ metadata.site.domain }}/now/ + + + https://{{ metadata.site.domain }}/blog/ + 0.8 + + + https://{{ metadata.site.domain }}/links/ + + + https://{{ metadata.site.domain }}/user-manual.html + + {% for tag in tags %} + + https://{{ metadata.site.domain }}/post/tag/{{ tag.slug }}/ + + {% endfor %} + {% for post in posts %} + + https://{{ metadata.site.domain }}/post/{{ post.slug }}/ + {{ post.date }}Z + + {% endfor %} + \ No newline at end of file