fix: script loading + script order
This commit is contained in:
parent
8b794c8fec
commit
89784d9656
|
@ -55,7 +55,6 @@
|
||||||
{{ if .Site.Params.options.bootStrapJs -}}
|
{{ if .Site.Params.options.bootStrapJs -}}
|
||||||
<script src="{{ $bs.Permalink }}" defer></script>
|
<script src="{{ $bs.Permalink }}" defer></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
<script src="{{ $js.Permalink }}" defer></script>
|
|
||||||
{{ if .Site.Params.options.highLight -}}
|
{{ if .Site.Params.options.highLight -}}
|
||||||
<script src="{{ $highlight.Permalink }}" defer></script>
|
<script src="{{ $highlight.Permalink }}" defer></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
@ -63,6 +62,7 @@
|
||||||
<script src="{{ $katex.Permalink }}" defer></script>
|
<script src="{{ $katex.Permalink }}" defer></script>
|
||||||
<script src="{{ $katexAutoRender.Permalink }}" onload="renderMathInElement(document.body);" defer></script>
|
<script src="{{ $katexAutoRender.Permalink }}" onload="renderMathInElement(document.body);" defer></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
<script src="{{ $js.Permalink }}" defer></script>
|
||||||
{{ if .Site.Params.options.flexSearch -}}
|
{{ if .Site.Params.options.flexSearch -}}
|
||||||
<script src="{{ $index.Permalink }}" defer></script>
|
<script src="{{ $index.Permalink }}" defer></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
@ -76,14 +76,14 @@
|
||||||
{{ if .Site.Params.options.bootStrapJs -}}
|
{{ if .Site.Params.options.bootStrapJs -}}
|
||||||
<script src="{{ $bs.Permalink }}" integrity="{{ $bs.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
<script src="{{ $bs.Permalink }}" integrity="{{ $bs.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
|
||||||
{{ if .Site.Params.options.highLight -}}
|
{{ if .Site.Params.options.highLight -}}
|
||||||
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ if .Site.Params.options.kaTex -}}
|
{{ if .Site.Params.options.kaTex -}}
|
||||||
<script src="{{ $katex.Permalink }}" integrity="{{ $katex.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
<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 -}}
|
{{ end -}}
|
||||||
|
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||||
{{ if .Site.Params.options.flexSearch -}}
|
{{ if .Site.Params.options.flexSearch -}}
|
||||||
<script src="{{ $index.Permalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
<script src="{{ $index.Permalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
NPM_VERSION = "7.3.0"
|
NPM_VERSION = "7.3.0"
|
||||||
|
|
||||||
[context.production]
|
[context.production]
|
||||||
command = "hugo -b $URL --gc && npm run build:functions"
|
command = "hugo -b $URL --gc --minify && npm run build:functions"
|
||||||
|
|
||||||
[context.deploy-preview]
|
[context.deploy-preview]
|
||||||
command = "hugo -b $DEPLOY_PRIME_URL --gc"
|
command = "hugo -b $DEPLOY_PRIME_URL --gc --minify"
|
||||||
|
|
||||||
[context.branch-deploy]
|
[context.branch-deploy]
|
||||||
command = "hugo -b $DEPLOY_PRIME_URL --gc"
|
command = "hugo -b $DEPLOY_PRIME_URL --gc --minify"
|
||||||
|
|
Loading…
Reference in New Issue