Add script-early inline for quicker loading.
This commit is contained in:
parent
96622bece4
commit
47a65ccc1d
2 changed files with 4 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* A JavaScript file for the theme. Runs first, before other things have loaded.
|
* A JavaScript file for the theme. Runs first, before other things have loaded.
|
||||||
|
* Will be added inline for quick loading.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,9 @@
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{ $early := resources.Get "js/script-early.js" | js.Build $opts | fingerprint -}}
|
{{ $early := resources.Get "js/script-early.js" | js.Build $opts | fingerprint -}}
|
||||||
<script src="{{ $early.RelPermalink }}"></script>
|
<script>
|
||||||
|
{{ $early.Content | safeJS }}
|
||||||
|
</script>
|
||||||
|
|
||||||
{{ if $.Param "alpine" -}}
|
{{ if $.Param "alpine" -}}
|
||||||
{{ $alpine := resources.Get "libs/alpine.min.js" | fingerprint -}}
|
{{ $alpine := resources.Get "libs/alpine.min.js" | fingerprint -}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue