Move build scripts into their own folder

This commit is contained in:
2021-10-21 22:39:25 -07:00
parent 095d0e3e84
commit 304fcaed10
4 changed files with 3 additions and 3 deletions

20
build/builder.sh Normal file
View File

@@ -0,0 +1,20 @@
source $stdenv/setup
# Copy files to a mutable directory.
cp -r $src/* .
# Hugo can't set baseUrl via CLI for multi-lingual hosts.
# We have to manually edit the configuration.
sed -i "$urlSub" config.toml
# Build site with Hugo
hugo $extraFlags
# Output result
mkdir $out
cp -r public/$publicPath/* $out/
# Render math in HTML and XML files.
node $server &
sleep 1
find $out/ -regex "$out/.*\.html" | xargs ruby $converter