mirror of
https://github.com/ItsDrike/itsdrike.com.git
synced 2024-11-12 23:07:17 +00:00
Add some scripts for faster workflow
This commit is contained in:
parent
e6db609303
commit
d23d5f6c61
14
scripts/build.sh
Executable file
14
scripts/build.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
source ./scripts/common.sh
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
rm -rf "$STATIC_BUILD"
|
||||||
|
rm -rf "$OUTPUT_DIR"
|
||||||
|
|
||||||
|
cp -r "$STATIC_SRC/img" "$STATIC_BUILD/img"
|
||||||
|
cp -r "$STATIC_SRC/js" "$STATIC_BUILD/js"
|
||||||
|
cp -r "$STATIC_SRC/css" "$STATIC_BUILD/css"
|
||||||
|
cp -r "$STATIC_SRC/scss" "$STATIC_BUILD/scss"
|
||||||
|
|
||||||
|
hugo gen chromastyles --style=monokai > "$STATIC_BUILD/css/highlight.css"
|
||||||
|
|
||||||
|
hugo -vDEF --gc $@
|
8
scripts/common.sh
Executable file
8
scripts/common.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
BASEDIR="$PWD"
|
||||||
|
OUTPUT_DIR="$BASEDIR/public"
|
||||||
|
STATIC_SRC="$BASEDIR/static/src"
|
||||||
|
STATIC_BUILD="$BASEDIR/static/build"
|
||||||
|
|
||||||
|
[[ -f "$BASEDIR/.env" ]] && export $(cat "$BASEDIR/.env" | xargs)
|
7
scripts/server.sh
Normal file
7
scripts/server.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
source ./scripts/common.sh
|
||||||
|
|
||||||
|
./scripts/build.sh
|
||||||
|
|
||||||
|
hugo server --noHTTPCache --disableFastRender --gc
|
Loading…
Reference in a new issue