2018-05-18 20:59:30 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
source ./scripts/common.sh
|
|
|
|
|
|
|
|
rm -rf $OUTPUT_DIR
|
|
|
|
rm -rf $STATIC_BUILD
|
|
|
|
rm -rf $BASEDIR/resources
|
2018-08-15 21:05:51 +01:00
|
|
|
mkdir -p $STATIC_BUILD/js $STATIC_BUILD/scss
|
|
|
|
hugo gen chromastyles --style=tango > $STATIC_BUILD/scss/highlight.scss
|
2018-05-18 20:59:30 +01:00
|
|
|
cp -r $BASEDIR/node_modules/lightgallery/dist/fonts $STATIC_BUILD
|
|
|
|
cp -r $STATIC_SRC/img $STATIC_BUILD/img
|
2018-06-17 12:03:33 +01:00
|
|
|
cp -r $BASEDIR/node_modules/lightgallery/dist/img/* $STATIC_BUILD/img
|
2018-08-15 19:51:15 +01:00
|
|
|
|
2018-08-16 20:49:42 +01:00
|
|
|
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
|
2018-08-15 19:51:15 +01:00
|
|
|
|
2018-06-17 12:03:33 +01:00
|
|
|
parcel build $STATIC_SRC/js/index.js -d $STATIC_BUILD/js/ -o app.js
|
2018-08-15 21:05:51 +01:00
|
|
|
cp -r $STATIC_SRC/scss/* $STATIC_BUILD/scss/
|
2018-05-18 20:59:30 +01:00
|
|
|
|
2018-08-18 11:24:43 +01:00
|
|
|
hugo -vDEF --stepAnalysis --gc $HUGO_ARGS
|
2018-05-18 20:59:30 +01:00
|
|
|
|
2018-06-17 12:03:33 +01:00
|
|
|
mkdir -p $OUTPUT_DIR/.well-known/
|
2018-05-18 20:59:30 +01:00
|
|
|
cp $BASEDIR/static/keybase.txt $OUTPUT_DIR/keybase.txt
|
|
|
|
cp $BASEDIR/static/security.txt $OUTPUT_DIR/.well-known/security.txt
|