Attempt to implement a feature flag to toggle CSS layers on and off
This commit is contained in:
parent
4f63fab916
commit
4cedd992b8
4 changed files with 29 additions and 9 deletions
11
layouts/partials/flag_is_enabled.html
Normal file
11
layouts/partials/flag_is_enabled.html
Normal 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 }}
|
Loading…
Add table
Add a link
Reference in a new issue