diff --git a/v4/exampleSite/config.toml b/v4/exampleSite/config.toml index 2e75678c8..952049bb5 100644 --- a/v4/exampleSite/config.toml +++ b/v4/exampleSite/config.toml @@ -20,9 +20,6 @@ googleAnalytics = "" disqusShortname = "" [params] - # theme.css and theme.js will not be minified, and integrity will not be added - env = "DEV" - # Custom CSS/JS modules that will be imported by the template. # Files are relative to the static/ directory or a URL. # Files are imported in the order they appear here, after diff --git a/v4/layouts/partials/css.html b/v4/layouts/partials/css.html index 4ef8ef468..3a3092272 100644 --- a/v4/layouts/partials/css.html +++ b/v4/layouts/partials/css.html @@ -1,7 +1,7 @@ {{ $options := dict "targetPath" "theme.css" "enableSourceMap" true "precision" 6 }} {{ $css := resources.Get "sass/theme.scss" | resources.ExecuteAsTemplate "theme.scss" . | toCSS $options }} -{{ if or (.Site.IsServer) (eq .Site.Params.env "DEV") }} +{{ if or (.Site.IsServer) (eq hugo.Environment "development") }} {{ else }} {{ $css := $css | resources.Minify | resources.Fingerprint }} diff --git a/v4/layouts/partials/js.html b/v4/layouts/partials/js.html index 1b058e070..483915a90 100644 --- a/v4/layouts/partials/js.html +++ b/v4/layouts/partials/js.html @@ -27,7 +27,7 @@ {{ $js := $jsToConcat | resources.Concat "theme.js" }} -{{ if or (.Site.IsServer) (eq .Site.Params.env "DEV") }} +{{ if or (.Site.IsServer) (eq hugo.Environment "development") }} {{ else }} {{ $js := $js | resources.Minify | resources.Fingerprint }}