#101: Simplifying environment detection
This commit is contained in:
parent
f996392dda
commit
4d405ead5d
4 changed files with 7 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
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 environment is not `production` then robots will be disallowed.
|
||||
{{ if hugo.IsProduction }}
|
||||
Disallow:
|
||||
{{ else }}
|
||||
Disallow: /
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue