diff --git a/.hugo_build.lock b/.hugo_build.lock deleted file mode 100644 index e69de29..0000000 diff --git a/hugo.toml b/hugo.toml index a240f7c..16c550d 100644 --- a/hugo.toml +++ b/hugo.toml @@ -10,20 +10,16 @@ disableKinds = ["page", "section", "taxonomy", "term"] source = "assets" target = "assets" [[module.mounts]] - source = "hugo_stats.json" - target = "assets/watching/hugo_stats.json" + source = "hugo_stats.json" + target = "assets/notwatching/hugo_stats.json" + disableWatch = true [build] - writeStats = true + writeStats = true + useResourceCacheWhen = 'never' [[build.cachebusters]] - source = "assets/watching/hugo_stats\\.json" + source = "assets/notwatching/hugo_stats\\.json" target = "styles\\.css" [[build.cachebusters]] source = "(postcss|tailwind)\\.config\\.js" target = "css" - [[build.cachebusters]] - source = "assets/.*\\.(js|ts|jsx|tsx)" - target = "js" - [[build.cachebusters]] - source = "assets/.*\\.(.*)$" - target = "$1" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index cf8c4af..05b5dcf 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,4 +1,4 @@ - + @@ -6,14 +6,17 @@ {{ .Title }} - {{/* styles */}} - {{ $options := dict "inlineImports" true }} - {{ $styles := resources.Get "css/styles.css" }} - {{ $styles = $styles | resources.PostCSS $options }} - {{ if hugo.IsProduction }} - {{ $styles = $styles | minify | fingerprint | resources.PostProcess }} + {{ with (defer (dict "key" "styles" "data" "foo")) }} + {{ warnf "deferred: %s" . }} + {{ $options := dict "inlineImports" true }} + {{ $styles := resources.Get "css/styles.css" }} + {{ $styles = $styles | resources.PostCSS $options }} + {{ if hugo.IsProduction }} + {{ $styles = $styles | minify | fingerprint }} + {{ end }} + {{ end }} - +