diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index a364cca2..d0630a20 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -127,8 +127,11 @@
navigate: (url) => (window.location.href = url),
prefetch: () => {},
}
- init()
- render()
+
+ window.addEventListener("DOMContentLoaded", () => {
+ init()
+ render()
+ })
{{end}}