From f0ad6d8026cd9b8e8217bd225efcc0ed38f20296 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Mon, 30 Jun 2025 21:07:28 -0600 Subject: Add robots.txt and sitemap --- robots.txt | 5 +++++ sitemap.xml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 robots.txt create mode 100644 sitemap.xml diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..e5123b2 --- /dev/null +++ b/robots.txt @@ -0,0 +1,5 @@ +--- +layout: content +--- +User-agent: * +Sitemap: {{ site.url }}/sitemap.xml diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..f9b79db --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,32 @@ +--- +layout: content +--- + + +{% for lang in site.languages %} + + {% for node in site.pages %} + {% comment %}{% endcomment %} + {% unless site.exclude_from_localization contains node.path %} + {% comment %}{% endcomment %} + {% if node.layout %} + + {% if lang == site.default_lang %}{{ node.url | absolute_url }}{% else %}{{ node.url | prepend: lang | prepend: '/' | absolute_url }}{% endif %} + {% if node.last_modified_at and node.last_modified_at != node.date %}{{ node.last_modified_at | date: '%Y-%m-%dT%H:%M:%S%:z' }}{% elsif node.date %}{{ node.date | date: '%Y-%m-%dT%H:%M:%S%:z' }}{% endif %} + + {% endif %} + {% endunless %} + {% endfor %} + + {% comment %}{% endcomment %} + {% for collection in site.collections %} + {% for node in site[collection.label] %} + + {% if lang == site.default_lang %}{{ node.url | absolute_url }}{% else %}{{ node.url | prepend: lang | prepend: '/' | absolute_url }}{% endif %} + {% if node.last_modified_at and node.last_modified_at != node.date %}{{ node.last_modified_at | date: '%Y-%m-%dT%H:%M:%S%:z' }}{% elsif node.date %}{{ node.date | date: '%Y-%m-%dT%H:%M:%S%:z' }}{% endif %} + + {% endfor %} + {% endfor %} + +{% endfor %} + -- cgit v1.2.3