1
Fork 0

Use async scripts, and remove thumbnail plugin to make it easier

This commit is contained in:
Jake Howard 2018-12-01 17:03:46 +00:00
parent 3a1162d439
commit 02b02d3ac1
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 6 additions and 6 deletions

View file

@ -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>

View file

@ -0,0 +1,2 @@
{{ $script := resources.Get . | minify | fingerprint }}
<script type="text/javascript" async src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>

View file

@ -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