* fix(favicon): dynamic favicon switching based on color scheme in js * refactor(favicon): simplify favicon logic and ensure dynamic switching based on color scheme * docs(favicon): enhance favicon setup instructions with dark mode support and adaptive SVG guidance
17 lines
954 B
HTML
17 lines
954 B
HTML
{{- $jsTheme := resources.Get "js/theme.js" | resources.ExecuteAsTemplate "theme.js" . -}}
|
|
{{- $jsMenu := resources.Get "js/menu.js" -}}
|
|
{{- $jsTabs := resources.Get "js/tabs.js" -}}
|
|
{{- $jsLang := resources.Get "js/lang.js" -}}
|
|
{{- $jsNavMenu := resources.Get "js/nav-menu.js" -}}
|
|
{{- $jsCodeCopy := resources.Get "js/code-copy.js" -}}
|
|
{{- $jsFileTree := resources.Get "js/filetree.js" -}}
|
|
{{- $jsSidebar := resources.Get "js/sidebar.js" -}}
|
|
{{- $jsBackToTop := resources.Get "js/back-to-top.js" -}}
|
|
{{- $jsFavicon := resources.Get "js/favicon.js" | resources.ExecuteAsTemplate "favicon.js" . -}}
|
|
|
|
{{- $scripts := slice $jsTheme $jsMenu $jsCodeCopy $jsTabs $jsLang $jsNavMenu $jsFileTree $jsSidebar $jsBackToTop $jsFavicon | resources.Concat "js/main.js" -}}
|
|
{{- if hugo.IsProduction -}}
|
|
{{- $scripts = $scripts | minify | fingerprint -}}
|
|
{{- end -}}
|
|
<script defer src="{{ $scripts.RelPermalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
|