aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2025-01-05 16:10:52 +0100
committerOscar Najera <hi@oscarnajera.com>2025-01-05 16:28:42 +0100
commitf9e5452a0046e6e47425f0c58d438d0f573fece9 (patch)
tree3ab76cba6c230e69b180c08a71a525767eac42d4
parent00955349164d98747ccc0fdc01b74b51868991b6 (diff)
downloadhugo-minimalist-theme-f9e5452a0046e6e47425f0c58d438d0f573fece9.tar.gz
hugo-minimalist-theme-f9e5452a0046e6e47425f0c58d438d0f573fece9.tar.bz2
hugo-minimalist-theme-f9e5452a0046e6e47425f0c58d438d0f573fece9.zip
use async to load js files
-rw-r--r--layouts/_default/search.html2
-rw-r--r--layouts/partials/head.html5
2 files changed, 6 insertions, 1 deletions
diff --git a/layouts/_default/search.html b/layouts/_default/search.html
index 1f179bc..41596de 100644
--- a/layouts/_default/search.html
+++ b/layouts/_default/search.html
@@ -35,6 +35,7 @@
</article>
</template>
<script
+ async
src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/7.0.0/fuse.min.js"
integrity="sha512-GrJ4P9yra6dftp5O0eaKFKS4ch1FYn1xR/VCHQIMJO1LNqcKhjkAkAETHYoE81Ffh3BjCJMWA/AZSYP521jxFA=="
crossorigin="anonymous"
@@ -43,6 +44,7 @@
{{ with resources.Get "js/search.js" | resources.Minify | fingerprint }}
<script
+ async
src="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous"
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index dfc2f2b..be48acf 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -31,5 +31,8 @@
{{ end -}}
- <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
+ <script
+ async
+ src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
+ ></script>
</head>