-
Notifications
You must be signed in to change notification settings - Fork 0
/
hugo
executable file
·68 lines (59 loc) · 917 Bytes
/
hugo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh
help() {
echo "Usage: $0 <action> [options]
Action:
new <docs/folder> [filename] -- create new content
build -- build blog
run -- run live server
"
}
version() {
hugo version
}
docs() {
hugo new --kind=docs $1
}
folder() {
hugo new --kind=folder $1
}
new() {
echo $*
case $1 in
docs)
docs $2
;;
folder)
folder $2
;;
*)
help
;;
esac
}
build() {
hugo --minify
}
run() {
hugo server --minify --bind 0.0.0.0
}
case $1 in
new)
new $2 $3
;;
build)
build
;;
run)
run
;;
version)
version
;;
-h | --help)
help
;;
*)
echo "unknown action $1"
help
;;
esac