diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91065d1d..313c9f88 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,12 +20,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Changed
+- ⚠️ Required Hugo version is now 0.87.0 or later
+- ⚠️ Author images are now Hugo assets
+- ⚠️ Overhauled `figure` shortcode which now resizes images
+- ⚠️ Renamed parameter: `darkToggle` -> `showDarkToggle`
- Upgrade to Tailwind v3.0.15
- Upgrade to KaTeX v0.15.2
- Inline Javascript moved to external files
-- Author images are now Hugo assets
-- Required Hugo version is now 0.87.0 or later
-- Overhauled `figure` shortcode which now resizes images
- Improved JSON-LD structured data
- Minor style and layout improvements
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index e5bd6cf3..046faf7d 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -32,41 +32,32 @@
{{ range .AlternativeOutputFormats -}}
{{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{ end -}}
- {{/* Styles */}}
- {{ $schemeCSS := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "congo")) }}
- {{ if not $schemeCSS }}
- {{ $schemeCSS = resources.Get "css/schemes/congo.css" }}
+ {{/* Asset bundles */}}
+ {{ $assets := newScratch }}
+ {{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "congo")) }}
+ {{ if not $cssScheme }}
+ {{ $cssScheme = resources.Get "css/schemes/congo.css" }}
{{ end }}
- {{ $schemeStyles := $schemeCSS | resources.Minify | resources.Fingerprint "sha512" }}
+ {{ $assets.Add "css" (slice $cssScheme) }}
+ {{ $cssMain := resources.Get "css/compiled/main.css" }}
+ {{ $assets.Add "css" (slice $cssMain) }}
+ {{ $cssCustom := resources.Get "css/custom.css" }}
+ {{ if $cssCustom }}
+ {{ $assets.Add "css" (slice $cssCustom) }}
+ {{ end }}
+ {{ $bundleCSS := $assets.Get "css" | resources.Concat "css/main.bundle.css" | resources.Minify | resources.Fingerprint "sha512" }}
- {{ $mainCSS := resources.Get "css/compiled/main.css" }}
- {{ $mainStyles := $mainCSS | resources.Minify | resources.Fingerprint "sha512" }}
-
- {{ $customCSS := resources.Get "css/custom.css" }}
- {{ if $customCSS }}
- {{ $customStyles := $customCSS | resources.Minify | resources.Fingerprint "sha512" }}
-
- {{ end }}
{{ if eq (.Site.Params.darkMode | default "auto") "auto" }}
- {{ $darkJS := resources.Get "js/dark.js" }}
- {{ $darkJS := $darkJS | resources.Minify | resources.Fingerprint "sha512" }}
-
+ {{ $jsDark := resources.Get "js/dark.js" }}
+ {{ $assets.Add "js" (slice $jsDark) }}
{{ end }}
+ {{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
+
{{/* Icons */}}
{{ if templates.Exists "partials/favicons.html" }}
{{ partialCached "favicons.html" .Site }}