modify run to accept a subdirectory, so can be compatible with editor files in same project directory
parent
ae1d9f73b7
commit
c56f3caf49
5
run
5
run
|
@ -15,15 +15,16 @@ else
|
|||
echo warning no environoment file set for $1 in $RDIR/sites
|
||||
fi
|
||||
DATA_DIR=${DATA_DIR:-${HOME}/.local/hugo}
|
||||
DATA_DIR=${DATA_DIR}/${1}$([[ $DATA_SUB_DIR ]] && echo "/$DATA_SUB_DIR")
|
||||
HUGO=${HUGO:-$(command -v hugo)}
|
||||
PORT=${PORT:-8096}
|
||||
echo site files in $DATA_DIR/$1 listening on port $PORT
|
||||
echo site files in $DATA_DIR listening on port $PORT
|
||||
# [[ $(netstat -tulpn | grep LISTEN | grep 0.0.0.0:$PORT) ]] && echo tcp port $PORT is busy can not start hugo server && exit
|
||||
CMD="$HUGO server
|
||||
$([[ $BASE_URL = "https://"* ]] && echo " --liveReloadPort 443")
|
||||
--bind 0.0.0.0
|
||||
--themesDir $RDIR/themes
|
||||
--source $DATA_DIR/$1
|
||||
--source $DATA_DIR
|
||||
--port $PORT
|
||||
--appendPort=$([[ $REVERSE_PROXY = true ]] && echo false || echo true)
|
||||
--baseURL ${BASE_URL:-localhost}
|
||||
|
|
Loading…
Reference in New Issue