summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/robots.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/layouts/robots.txt b/layouts/robots.txt
index 7a24e82..9f95983 100644
--- a/layouts/robots.txt
+++ b/layouts/robots.txt
@@ -1,8 +1,12 @@
+{{- $url := urls.Parse site.BaseURL -}}
+# robots.txt file for "{{ site.Title }}", {{ $url.Host }}
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") }}
+{{- if eq (getenv "HUGO_ENV") "production" | or (eq site.Params.env "production") }}
Allow: /
-Sitemap: {{.Site.BaseURL}}/sitemap.xml
-{{ else }}
+Sitemap: {{ site.BaseURL }}/sitemap.xml
+{{- else }}
Disallow: /
-{{ end }}
+{{- end }}
+
+# TODO: implement sitemap.xml
+# Sitemap: {{ site.BaseURL }}/sitemap.xml