From 58ed6b3aa2339798d26c068674fe1d1bb25c4a3b Mon Sep 17 00:00:00 2001 From: George Cushen Date: Fri, 27 Oct 2023 20:56:53 +0100 Subject: [PATCH] fix: workaround Hugo concurrency issues --- modules/wowchemy-tailwind/layouts/partials/init.html | 5 +++++ modules/wowchemy-tailwind/layouts/partials/site_head.html | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 modules/wowchemy-tailwind/layouts/partials/init.html diff --git a/modules/wowchemy-tailwind/layouts/partials/init.html b/modules/wowchemy-tailwind/layouts/partials/init.html new file mode 100644 index 00000000..4404da03 --- /dev/null +++ b/modules/wowchemy-tailwind/layouts/partials/init.html @@ -0,0 +1,5 @@ +{{/* Workaround Hugo concurrency issues (e.g. not detecting Page.Store variables) */}} +{{/* https://discourse.gohugo.io/t/persisting-data-across-the-build-of-a-site/41114/6 */}} +{{- range site.AllPages }} + {{- $noop := .Content }} +{{- end -}} diff --git a/modules/wowchemy-tailwind/layouts/partials/site_head.html b/modules/wowchemy-tailwind/layouts/partials/site_head.html index 2a8acc51..27f97fba 100644 --- a/modules/wowchemy-tailwind/layouts/partials/site_head.html +++ b/modules/wowchemy-tailwind/layouts/partials/site_head.html @@ -276,6 +276,9 @@ } + {{/* Init prior to auto-chunking/bundling scripts due to Hugo concurrency issues */}} + {{- partialCached "init.html" . -}} + {{/* Load Third-Party Libraries */}} {{ partial "libraries.html" . }}