diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 00000000..35f59d15 --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,7 @@ +User-agent: * +{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} +Disallow: +{{- else }} +Disallow: / +{{- end }} +Sitemap: {{ "sitemap.xml" | absURL }}