diff options
author | Dillon <dillonzq@outlook.com> | 2020-03-02 12:03:35 +0300 |
---|---|---|
committer | Dillon <dillonzq@outlook.com> | 2020-03-02 12:03:35 +0300 |
commit | 285efc01bbd6ff84f025b1acc5060233185e2f01 (patch) | |
tree | 123a3a4441a190accb784c8a383953c5b43c93e0 /layouts | |
parent | f83b1c14c88b36de419e0eeb3b7e335434bb2032 (diff) |
feat(environment): use hugo.Environment to judge the production environment
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index dd6a792..90f5b6f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,7 +5,7 @@ {{- $scratch := newScratch -}} {{- .Scratch.Set "scratch" $scratch -}} -{{- if eq (getenv "HUGO_ENV") "production" -}} +{{- if eq hugo.Environment "production" -}} {{- $scratch.Set "production" true -}} {{- $scratch.Set "CDN" .Site.Params.cdn -}} {{- end -}} |