Attempt to implement a feature flag to toggle CSS layers on and off

This commit is contained in:
Eryn Wells 2023-05-20 08:30:35 -07:00
parent 4f63fab916
commit 4cedd992b8
4 changed files with 29 additions and 9 deletions

View file

@ -0,0 +1,11 @@
{{ $result := false }}
{{ with $flag := index . site.Params.flags }}
{{ if hugo.IsProduction }}
{{ $result = in (slice "yes" "true" "production" "development") $flag }}
{{ else }}
{{ $result = in (slice "yes" "true" "development") $flag }}
{{ end }}
{{ end }}
{{ return $result }}