fix: script loading + script order

This commit is contained in:
Henk Verlinde 2021-03-17 08:59:47 +01:00
parent 8b794c8fec
commit 89784d9656
2 changed files with 6 additions and 6 deletions

View File

@ -55,7 +55,6 @@
{{ if .Site.Params.options.bootStrapJs -}}
<script src="{{ $bs.Permalink }}" defer></script>
{{ end -}}
<script src="{{ $js.Permalink }}" defer></script>
{{ if .Site.Params.options.highLight -}}
<script src="{{ $highlight.Permalink }}" defer></script>
{{ end -}}
@ -63,6 +62,7 @@
<script src="{{ $katex.Permalink }}" defer></script>
<script src="{{ $katexAutoRender.Permalink }}" onload="renderMathInElement(document.body);" defer></script>
{{ end -}}
<script src="{{ $js.Permalink }}" defer></script>
{{ if .Site.Params.options.flexSearch -}}
<script src="{{ $index.Permalink }}" defer></script>
{{ end -}}
@ -76,14 +76,14 @@
{{ if .Site.Params.options.bootStrapJs -}}
<script src="{{ $bs.Permalink }}" integrity="{{ $bs.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}}
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ if .Site.Params.options.highLight -}}
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}}
{{ if .Site.Params.options.kaTex -}}
<script src="{{ $katex.Permalink }}" integrity="{{ $katex.Data.Integrity }}" crossorigin="anonymous" defer></script>
<script src="{{ $katexAutoRender.Permalink }}" integrity="{{ $katexAutoRender.Data.Integrity }}" crossorigin="anonymous" onload="renderMathInElement(document.body);" defer></script>
<script src="{{ $katexAutoRender.Permalink }}" integrity="{{ $katexAutoRender.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}}
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ if .Site.Params.options.flexSearch -}}
<script src="{{ $index.Permalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}}

View File

@ -8,10 +8,10 @@
NPM_VERSION = "7.3.0"
[context.production]
command = "hugo -b $URL --gc && npm run build:functions"
command = "hugo -b $URL --gc --minify && npm run build:functions"
[context.deploy-preview]
command = "hugo -b $DEPLOY_PRIME_URL --gc"
command = "hugo -b $DEPLOY_PRIME_URL --gc --minify"
[context.branch-deploy]
command = "hugo -b $DEPLOY_PRIME_URL --gc"
command = "hugo -b $DEPLOY_PRIME_URL --gc --minify"