From 5a8b531a7ce2f22eaa452ebab8325040982c9275 Mon Sep 17 00:00:00 2001
From: James Henstridge <james@jamesh.id.au>
Date: Wed, 07 Sep 2022 12:36:32 +0000
Subject: [PATCH] Improve links for sitemap and taxonomies (#569)

---
 layouts/robots.txt |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/layouts/robots.txt b/layouts/robots.txt
index 7a24e82..d4efb29 100644
--- a/layouts/robots.txt
+++ b/layouts/robots.txt
@@ -1,8 +1,8 @@
 User-agent: *
-# robotstxt.org - if ENV production variable is false robots will be disallowed.
-{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production")  }}
+{{/* robotstxt.org - if ENV production variable is false robots will be disallowed. */ -}}
+{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production")  -}}
 Allow: /
-Sitemap: {{.Site.BaseURL}}/sitemap.xml
-{{ else }}
+Sitemap: {{ "/sitemap.xml" | absURL }}
+{{ else -}}
 Disallow: /
-{{ end }}
+{{ end -}}

--
Gitblit v1.10.0