hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit 1ea9d9ad9091403baaf50acca040fa7759e26da4
parent 5435f851a139949bff7824b5ee3b83727b4e2cfd
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Tue, 14 Mar 2017 21:39:08 -0400

Create site into tmp in dev mod

Diffstat:
Mconfig/site.cfg | 1+
Mfakestache | 7+++++++
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/config/site.cfg b/config/site.cfg @@ -4,6 +4,7 @@ # Site configuration file export SITE_DOMAINNAME="hugo.soucy.cc" export SITE_URL="http://${SITE_DOMAINNAME}" +export SITE_PORT_DEV=8181 export SITE_URL_DEV="http://localhost:8181" export SITE_LANGUAGE="fr" diff --git a/fakestache b/fakestache @@ -63,6 +63,9 @@ case $1 in # In dev mode the site is build in `/tmp` PUBLICHTML_PATH=$TMP_PATH/$PUBLICHTML + # Create `/tmp/fakestache` directory if it is not there + [ ! -d "$PUBLICHTML_PATH/" ] && mkdir -p "$PUBLICHTML_PATH/" + case $2 in -r|--reset) reset=true @@ -84,6 +87,9 @@ case $1 in # In dev mode the site is build in `/tmp` PUBLICHTML_PATH=$TMP_PATH/$PUBLICHTML + # Create `/tmp/fakestache` directory if it is not there + [ ! -d "$PUBLICHTML_PATH/" ] && mkdir -p "$PUBLICHTML_PATH/" + # Open the dev mode site in the default browser # @todo But the server comment missing #$BROWSER $BASE_URL @@ -103,6 +109,7 @@ if hash pandoc 2>/dev/null && (( ${BASH_VERSION%%.*} >= 4 )); then clean_content_folder echo "- Your New Website Is Ready Here : $PUBLICHTML_PATH/ . Thanks Pandoc!!" + exit 0 else echo "- Sorry But You must Install *Pandoc* and/or have Bash >= 4 To Using *FakeStache SSG*."