From ef513e926173e82ef497d5042929486835ae4037 Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Date: Mon, 9 Oct 2023 21:50:42 -0400
Subject: [PATCH] Added template variables for sitemap

---
 config/_default/hugo.toml | 5 +++++
 layouts/robots.txt        | 2 ++
 static/robots.txt         | 1 -
 3 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 layouts/robots.txt
 delete mode 100644 static/robots.txt

diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml
index 3beb4bfd5..32ee8b857 100644
--- a/config/_default/hugo.toml
+++ b/config/_default/hugo.toml
@@ -7,6 +7,8 @@ pygmentsStyle = "monokai"
 DefaultContentLanguage = "en"
 defaultContentLanguageInSubdir = false
 
+enableRobotsTXT = true
+
 [services.rss]
 limit = 50
 
@@ -65,3 +67,6 @@ getenv = ['^HUGO_', '^CI$', '^ACTIPAGE_']
 
 [params]
 siteAuthor="Jeffrey Phillips Freeman"
+
+[sitemap]
+filename = 'sitemap.xml'
diff --git a/layouts/robots.txt b/layouts/robots.txt
new file mode 100644
index 000000000..319bc3add
--- /dev/null
+++ b/layouts/robots.txt
@@ -0,0 +1,2 @@
+User-agent: *
+Sitemap: {{ .Site.BaseURL }}sitemap.xml
diff --git a/static/robots.txt b/static/robots.txt
deleted file mode 100644
index 142f4a864..000000000
--- a/static/robots.txt
+++ /dev/null
@@ -1 +0,0 @@
-Sitemap: https://flear.org/sitemap.xml
-- 
GitLab