feat: update bootstrap to 5.0.0-beta2
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
{{ $indexTemplate := resources.Get "js/index.js" -}}
|
||||
{{ $index := $indexTemplate | resources.ExecuteAsTemplate "index.js" . -}}
|
||||
|
||||
{{ $bs := resources.Get "js/bootstrap.js" -}}
|
||||
{{ $bs := $bs | js.Build -}}
|
||||
|
||||
{{ $app := resources.Get "js/app.js" -}}
|
||||
|
||||
{{ $slice := slice $app -}}
|
||||
@ -37,6 +40,9 @@
|
||||
{{ $js := $slice | resources.Concat "main.js" -}}
|
||||
|
||||
{{ if eq (hugo.Environment) "development" -}}
|
||||
{{ if .Site.Params.options.bootStrapJs -}}
|
||||
<script src="{{ $bs.Permalink }}" defer></script>
|
||||
{{ end -}}
|
||||
<script src="{{ $js.Permalink }}" defer></script>
|
||||
{{ if .Site.Params.options.flexSearch -}}
|
||||
<script src="{{ $index.Permalink }}" defer></script>
|
||||
@ -44,6 +50,10 @@
|
||||
{{ else -}}
|
||||
{{ $js := $js | minify | fingerprint "sha512" -}}
|
||||
{{ $index := $index | minify | fingerprint "sha512" -}}
|
||||
{{ $bs := $bs | minify | fingerprint "sha512" -}}
|
||||
{{ 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.flexSearch -}}
|
||||
<script src="{{ $index.Permalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
|
Reference in New Issue
Block a user