Skip to content

Commit

Permalink
huge/Media: Add imgix.enable
Browse files Browse the repository at this point in the history
  • Loading branch information
regisphilibert committed Mar 11, 2022
1 parent b04ec15 commit 1fc6a68
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions layouts/partials/tnd-imgix/private/GetConfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
{{ with partialCached "huge/config/Get" "media" "media" }}
{{ with .imgix }}
{{ $config = . }}
{{/* To acommodate a per-environment enabling of imgix (imgix will only get images once deployed in production)
We prepopulate the imgix module's own `disable` setting with the opposite of Huge's own `enable` settings.
*/}}
{{ with $config.enable }}
{{ if not (partialCached "huge/env/When" . .) }}
{{ $config = merge $config (dict "disable" true) }}
{{ end }}
{{ end }}
{{ end }}

{{ end }}
{{ return $config }}

0 comments on commit 1fc6a68

Please sign in to comment.