diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 8d581cb..d54fe58 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -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" }} diff --git a/layouts/partials/script_async.html b/layouts/partials/script_async.html new file mode 100644 index 0000000..c1c59cc --- /dev/null +++ b/layouts/partials/script_async.html @@ -0,0 +1,2 @@ +{{ $script := resources.Get . | minify | fingerprint }} + diff --git a/scripts/build.sh b/scripts/build.sh index d11e217..c02cf4e 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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