Files
FixIt/layouts/_partials/head/script.html
T
Cell 3e8bdfd8f9 ♻️ Refactor: global/site/page scope state management (#610)
*  Perf: adjust global/site scope state management

*  Perf: adjust page scope state management
2025-07-03 12:48:32 +08:00

10 lines
554 B
HTML

{{- $fingerprint := .Site.Store.Get "fingerprint" -}}
{{- /* Check theme isDark before body rendering */ -}}
{{- $options := dict "targetPath" "js/head/color-scheme.min.js" "minify" hugo.IsProduction -}}
{{- $options := dict "defaultTheme" .Site.Params.defaulttheme | dict "params" | merge $options -}}
{{- if not hugo.IsProduction -}}
{{- $options = dict "sourceMap" "external" | merge $options -}}
{{- end -}}
{{- dict "Source" (resources.Get "js/head/color-scheme.js") "Build" $options "Fingerprint" $fingerprint | partial "plugin/script.html" -}}