diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 029e2a1..a5e2012 100755 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,7 +8,7 @@ {{ .Hugo.Generator }} {{/* NOTE: For Production make sure you add `HUGO_ENVIRONMENT="production"` before your build command */}} - {{ if eq hugo.Environment "production" }} + {{ if eq (getenv "HUGO_ENV") "production" | or (eq hugo.Environment "production") }} {{ else }} diff --git a/layouts/robots.txt b/layouts/robots.txt index c8434a2..8494bcc 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,6 +1,6 @@ User-agent: * # robotstxt.org - if environment is not production robots will be disallowed. -{{ if eq hugo.Environment "production" }} +{{ if eq (getenv "HUGO_ENV") "production" | or (eq hugo.Environment "production") }} Disallow: {{ else }} Disallow: /