diff options
-rwxr-xr-x | vienna | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/vienna b/vienna index 8ce8468..31c46c7 100755 --- a/vienna +++ b/vienna | |||
@@ -26,6 +26,9 @@ PARAMETERS: | |||
26 | publish publish the site after building. | 26 | publish publish the site after building. |
27 | NOTE: this requires a .vienna.sh file in the site root. | 27 | NOTE: this requires a .vienna.sh file in the site root. |
28 | you'll have to define a \`publish' function there. | 28 | you'll have to define a \`publish' function there. |
29 | preview preview the site locally after building. | ||
30 | NOTE: this requires a .vienna.sh file in the site root. | ||
31 | you'll have to define a \`preview' function there. | ||
29 | 32 | ||
30 | you can redefine any variables or functions vienna uses in \$VIENNA_CONFIG, | 33 | you can redefine any variables or functions vienna uses in \$VIENNA_CONFIG, |
31 | which by default is ./.vienna.sh. vienna uses heredoc-inspired templating, so | 34 | which by default is ./.vienna.sh. vienna uses heredoc-inspired templating, so |
@@ -111,10 +114,27 @@ cleanup() { | |||
111 | } | 114 | } |
112 | 115 | ||
113 | publish() { | 116 | publish() { |
114 | echo >&2 "I want to publish your website but I don't know how." | 117 | cat <<EOF >&2 |
115 | echo >&2 "Make a $CONFIG file in this directory and write a" | 118 | |
116 | echo >&2 "\`publish' function telling me what to do. I rec-" | 119 | I want to publish your website but I don't know how. |
117 | echo >&2 "ommend using \`rsync', but you live your life." | 120 | Make a $CONFIG file in this directory and write a \`publish' |
121 | function telling me what to do. I recommend using \`rsync', | ||
122 | but you live your life." | ||
123 | |||
124 | EOF | ||
125 | exit 3 | ||
126 | } | ||
127 | |||
128 | preview() { | ||
129 | cat <<EOF >&2 | ||
130 | |||
131 | I want to show you a preview of your website but I don't | ||
132 | know how. Make a $CONFIG file in this directory and write | ||
133 | a \`preview' function telling me what to do. I recommend | ||
134 | using something like \`python -m http.server', but you live | ||
135 | your life." | ||
136 | |||
137 | EOF | ||
118 | exit 3 | 138 | exit 3 |
119 | } | 139 | } |
120 | 140 | ||