summaryrefslogtreecommitdiff
path: root/layouts/partials/cover.html
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-12-13 20:19:25 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-12-13 20:19:25 +0530
commitbf79c208aeb506c195d0ce3728d343e52b75e3f3 (patch)
treecb5969dd3daa630c263e17cf5514e861855d5347 /layouts/partials/cover.html
parent153740bbac3ce4f7a23369bed66112f6852b6af4 (diff)
layouts: use hugo.IsProduction
Diffstat (limited to 'layouts/partials/cover.html')
-rw-r--r--layouts/partials/cover.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html
index d44581b..86ee489 100644
--- a/layouts/partials/cover.html
+++ b/layouts/partials/cover.html
@@ -9,7 +9,7 @@
rel="noopener noreferrer">{{ end -}}
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") }}
- {{- $prod := (eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production")) }}
+ {{- $prod := (hugo.IsProduction | or (eq .Site.Params.env "production")) }}
{{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false) (eq $prod true)) }}
<img srcset="{{- range $size := $sizes -}}
{{- if (ge $cover.Width $size) -}}