We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b763fa6 commit 042d717Copy full SHA for 042d717
scripts/local.sh
@@ -1,3 +1,16 @@
1
#!/bin/bash
2
3
-hugo server -w --baseURL=http://localhost:1313 --config config.toml,releases.json
+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