{{- $language_code := site.LanguageCode | default "en-us" -}} {{ partial "site_head" . }} {{ $show_navbar := ((site.Params.header.navbar.enable | default true) | and (ne .Params.header.navbar.enable false)) | or .Params.header.navbar.enable }} {{- $highlight_active_link := site.Params.header.navbar.highlight_active_link | default true -}}
{{/* Initialise Wowchemy. */}} {{ $js_license := printf "/*! Wowchemy v%s | https://wowchemy.com/ */\n" site.Data.wowchemy.version }} {{ $js_license := $js_license | printf "%s/*! Copyright 2016-present George Cushen (https://georgecushen.com/) */\n" }} {{ $js_license := $js_license | printf "%s/*! License: https://github.com/wowchemy/wowchemy-hugo-themes/blob/main/LICENSE.md */\n" }} {{ $js_bundle_head := $js_license | resources.FromString "js/bundle-head.js" }} {{ $wcDarkLightEnabled := (and site.Params.appearance.theme_day site.Params.appearance.theme_night) }} {{ $wcIsSiteThemeDark := not (.Scratch.Get "light") | default false }} {{ $js_params := dict "wcDarkLightEnabled" $wcDarkLightEnabled "wcIsSiteThemeDark" $wcIsSiteThemeDark }} {{ $js_bundle := resources.Get "js/wowchemy-init.js" | js.Build (dict "params" $js_params) }} {{- if hugo.IsProduction -}} {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife") | minify -}} {{- else -}} {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife" "sourceMap" "inline") -}} {{ end }} {{ $js_bundle := slice $js_bundle_head $js_bundle | resources.Concat "js/wowchemy-init.min.js" }} {{- if hugo.IsProduction -}} {{ $js_bundle = $js_bundle | fingerprint "md5" }} {{- end -}} {{ partial "search" . }}