Build: Fix output directory

This commit is contained in:
Starbeamrainbowlabs 2020-02-09 23:43:39 +00:00
parent 4e8a8f73c3
commit 05a7beb07c
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 8 additions and 5 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
public/
# Created by https://www.gitignore.io/api/rust
# Edit at https://www.gitignore.io/?templates=rust

12
build
View file

@ -9,14 +9,14 @@ cd "$(dirname "$(readlink -f "$0")")";
project_name="pepperminty.wiki";
# The path to the lantern build engine git submodule
lantern_path=".";
lantern_path="./lantern-build-engine";
###
# Custom Settings
###
# Put any custom settings here.
zola="zola/target/release/zola";
zola="${PWD}/zola/target/release/zola";
###############################################################################
@ -36,7 +36,7 @@ if [[ "$#" -lt 1 ]]; then
echo -e "${CSECTION}Available actions${RS}";
echo -e " ${CACTION}setup${RS} - Perform initial setup";
echo -e " ${CACTION}build${RS} - Build the static site";
echo -e " ${CACTION}watch${RS} - Start a livereload server";
echo -e " ${CACTION}serve${RS} - Start a livereload server";
echo -e "";
exit 1;
@ -63,12 +63,14 @@ task_setup() {
task_build() {
task_begin "Building site";
"${zola}" build src;
cd src || { echo "Failed to cd into src"; exit 1; };
"${zola}" build --output-dir "../public";
task_end "$?";
}
task_serve() {
task_begin "Building site";
"${zola}" serve src;
cd src || { echo "Failed to cd into src"; exit 1; };
"${zola}" serve --output-dir "../public";
task_end "$?";
}