diff --git a/assets/js/main.js b/assets/js/main.js index 315040e0..964b1f43 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -6,7 +6,6 @@ import "./highlightHeadline.js"; import "./contentNavigation.js"; import "./anchorlinks.js"; import "./dropdown.js"; -import "./darkmode.js"; import "./search.js"; import "./interactiveMap.js"; import "./expander.js"; diff --git a/layouts/partials/head.html b/layouts/partials/head.html index c4943356..543376a6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -8,6 +8,8 @@ {{ printf "%s | %s" .Title site.Title }} {{ end }} +{{ partial "head/js" (dict "file" "js/darkmode.js" "defer" false) }} + {{ $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed") }} {{ with resources.Get "sass/main.scss" }} {{ $style := (resources.ExecuteAsTemplate "sass/main_templated.scss" $ .) | toCSS $options | minify }} @@ -24,7 +26,7 @@ new PagefindHighlight({ highlightParam: "highlight" }); -{{ partialCached "head/js" . }} +{{ partial "head/js" (dict "file" "js/main.js") }}