summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-11-08 22:30:33 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-11-08 22:31:27 +0530
commit77baa3d76ea400ff4c3f81f7fb90e21b15cf992f (patch)
tree7744a5abddebe0b117801c81facf4ec66559b695 /layouts
parent5264c7011e84f9b92e68ac77cf17d1b7fd105844 (diff)
layouts: add robots.txt
used when enableRobotsTXT: true https://gohugo.io/templates/robots/
Diffstat (limited to 'layouts')
-rw-r--r--layouts/robots.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/robots.txt b/layouts/robots.txt
new file mode 100644
index 0000000..35f59d1
--- /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 }}