layouts: add robots.txt

used when
enableRobotsTXT: true

https://gohugo.io/templates/robots/
This commit is contained in:
Aditya Telange 2020-11-08 22:30:33 +05:30
parent 5264c7011e
commit 77baa3d76e
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 7 additions and 0 deletions

7
layouts/robots.txt Normal file
View File

@ -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 }}