Skip to content

Commit 042d717

Browse files
Adding PR preview feature and updating local.sh script (#115)
* Adding netlify and updating shell script * removing netlify.toml file - switching it with surge.sh * removing baseurl - considers the domain itself
1 parent b763fa6 commit 042d717

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

scripts/local.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
#!/bin/bash
22

3-
hugo server -w --baseURL=http://localhost:1313 --config config.toml,releases.json
3+
set -e
4+
5+
GREEN='\033[32;1m'
6+
RESET='\033[0m'
7+
8+
if [[ $1 == "-p" || $1 == "--preview" ]]; then
9+
echo -e "$(date) $GREEN Generating tutorial static pages in the public folder. $RESET"
10+
hugo \
11+
--destination=public \
12+
--config config.toml,releases.json 1> /dev/null
13+
echo -e "$(date) $GREEN Done building. $RESET"
14+
else
15+
hugo server -w --baseURL=http://localhost:1313 --config config.toml,releases.json
16+
fi

0 commit comments

Comments
 (0)