19 lines
383 B
Bash
19 lines
383 B
Bash
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.
|
|
patchPhase
|
|
|
|
# Build site with Hugo
|
|
hugo $extraFlags
|
|
|
|
# Output result
|
|
mkdir $out
|
|
cp -r public/$publicPath/* $out/
|
|
|
|
# Render math in HTML and XML files.
|
|
find $out/ -regex "$out/.*\.html" | xargs katex-html
|