{{- /* FixIt theme environment detection */ -}}

{{- if hugo.IsProduction -}}
  {{- $cdn := .Site.Params.cdn -}}
  {{- with $cdn.data -}}
    {{- $cdnData := printf "data/cdn/%v" . | resources.Get | transform.Unmarshal -}}
    {{- $cdn = dict "simpleIconsPrefix" $cdnData.prefix.simpleIcons -}}
    {{- $prefix := $cdnData.prefix.libFiles | default "" -}}
    {{- range $key, $value := $cdnData.libFiles -}}
      {{- $cdn = printf "%v%v" $prefix $value | dict $key | merge $cdn -}}
    {{- end -}}
  {{- end -}}
  {{- .Site.Store.Set "cdn" $cdn -}}
  {{- .Site.Store.Set "fingerprint" .Site.Params.fingerprint -}}
  {{- .Site.Store.Set "analytics" .Site.Params.analytics -}}
  {{- .Store.Set "comment" (dict "Page" . "Key" "comment" | partial "function/param.html") -}}
{{- else -}}
  {{- .Site.Store.Set "devOpts" .Site.Params.dev -}}
  {{- if ne .Site.Params.dev.enable true -}}
    {{- .Site.Store.Set "devOpts" dict -}}
  {{- end -}}
  {{- if .Site.Language.IsDefault -}}
    {{- warnf "FixIt %v\n%v\n\n" (hugo.Store.Get "version") (T "init.devEnvWarn") -}}
  {{- end -}}
{{- end -}}
