From df93553a41b0077b5349d043e54277691a00d107 Mon Sep 17 00:00:00 2001 From: Nemo Date: Tue, 6 Jun 2023 15:22:38 +0530 Subject: [PATCH] Fix sitemap --- _layouts/default.html | 1 + robots.txt | 2 ++ sitemap.xml | 14 ++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 robots.txt create mode 100644 sitemap.xml diff --git a/_layouts/default.html b/_layouts/default.html index 58238c4..b581c81 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -2,6 +2,7 @@ {{page.title}} + {% include header.html %} diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..a308ab0 --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +Sitemap: https://news.tatooine.club/sitemap.xml +User-agent: * \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..5b599ed --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,14 @@ +--- +--- + + + {% assign pages = site.html_pages | where_exp:'doc','doc.url != "/404.html"' %} + {% for page in pages %} + + {{ page.url | replace:'/index.html','/' | absolute_url | xml_escape }} + {% if page.date}{{ page.date | date_to_xmlschema }}{%endif%} + + {% endfor %} +