diff --git a/layouts/partials/func/style/GetMainCSS.html b/layouts/partials/func/style/GetMainCSS.html index a6f68ae38..2853790f5 100644 --- a/layouts/partials/func/style/GetMainCSS.html +++ b/layouts/partials/func/style/GetMainCSS.html @@ -70,7 +70,7 @@ {{ $options := dict "enableSourceMap" true "precision" 6 }} {{ $style = $style | css.Sass $options | minify }} {{/* We fingerprint in production for cache busting purposes */}} - {{ if eq (getenv "HUGO_ENV") "production" }} + {{ if hugo.IsProduction }} {{ $style = $style | fingerprint }} {{ end }} {{/* We're ready to set returning variable with resulting resource */}} diff --git a/layouts/robots.txt b/layouts/robots.txt index d4efb2990..a1069a4a5 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,6 +1,6 @@ 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 we are in production, allow access, else deny */ -}} +{{ if hugo.IsProduction -}} Allow: / Sitemap: {{ "/sitemap.xml" | absURL }} {{ else -}}