Use async scripts, and remove thumbnail plugin to make it easier
This commit is contained in:
parent
3a1162d439
commit
02b02d3ac1
3 changed files with 6 additions and 6 deletions
|
@ -27,10 +27,9 @@
|
|||
{{ partial "footer.html" . }}
|
||||
|
||||
{{ partial "script.html" "js/jquery.min.js" }}
|
||||
{{ partial "script.html" "js/lightgallery.js" }}
|
||||
{{ partial "script.html" "js/lg-thumbnail.min.js" }}
|
||||
{{ partial "script.html" "js/bootstrap.min.js" }}
|
||||
{{ partial "script.html" "js/mermaid.min.js" }}
|
||||
{{ partial "script.html" "js/app.js" }}
|
||||
{{ partial "script_async.html" "js/lightgallery.js" }}
|
||||
{{ partial "script_async.html" "js/bootstrap.min.js" }}
|
||||
{{ partial "script_async.html" "js/mermaid.min.js" }}
|
||||
{{ partial "script_async.html" "js/app.js" }}
|
||||
</body>
|
||||
</html>
|
||||
|
|
2
layouts/partials/script_async.html
Normal file
2
layouts/partials/script_async.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{ $script := resources.Get . | minify | fingerprint }}
|
||||
<script type="text/javascript" async src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>
|
|
@ -14,7 +14,6 @@ cp -r $BASEDIR/node_modules/lightgallery/dist/img/* $STATIC_BUILD/img
|
|||
|
||||
cp $BASEDIR/node_modules/jquery/dist/jquery.min.js $STATIC_BUILD/js/jquery.min.js
|
||||
cp $BASEDIR/node_modules/lightgallery/dist/js/lightgallery.js $STATIC_BUILD/js/lightgallery.js
|
||||
cp $BASEDIR/node_modules/lg-thumbnail/dist/lg-thumbnail.min.js $STATIC_BUILD/js/lg-thumbnail.min.js
|
||||
cp $BASEDIR/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js $STATIC_BUILD/js/bootstrap.min.js
|
||||
cp $BASEDIR/node_modules/mermaid/dist/mermaid.min.js $STATIC_BUILD/js/mermaid.min.js
|
||||
|
||||
|
|
Loading…
Reference in a new issue