mirror of
https://git.tacowolf.net/TacoWolf/websites.git
synced 2026-06-12 07:40:02 -04:00
feat(mestizo.monster): update upload script to support 11ty better
This commit is contained in:
parent
cb1681db10
commit
2b83bc00b9
2 changed files with 10 additions and 5 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit b0955134ebb4a2ea959f1cca1719fc99be0ce55a
|
||||
Subproject commit 344058c9917a3ca2cf8d586bdc26c7a68f2b961d
|
||||
13
upload.sh
13
upload.sh
|
|
@ -9,15 +9,20 @@ CONFIG_FILE="$1/upload.conf"
|
|||
. "$CONFIG_FILE"
|
||||
|
||||
# export variable from config file
|
||||
export NEOCITIES_API_KEY
|
||||
export NEOCITIES_KEY
|
||||
|
||||
# build site
|
||||
if [ "$ENGINE" = "hugo" ]; then
|
||||
hugo -s "$1" -d "../$SITE_DIR"
|
||||
fi
|
||||
|
||||
# push index last to ensure resources are available
|
||||
neocities push -e index.html "$SITE_DIR"
|
||||
neocities upload "$SITE_DIR/index.html"
|
||||
if [ "$ENGINE" = "eleventy" ]; then
|
||||
currentdir=$(pwd)
|
||||
cd $1
|
||||
npx @11ty/eleventy
|
||||
cd $SITE_DIR
|
||||
neocities upload *
|
||||
cd $currentdir
|
||||
fi
|
||||
|
||||
rm -fr $SITE_DIR
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue