This repository has been archived on 2021-01-10. You can view files and clone it, but cannot push or open issues or pull requests.
custom-nix/blog/builder.sh

16 lines
316 B
Bash

source $stdenv/setup
# Install KaTeX for back-end rendering.
HOME="." npm install katex
# Build site with Hugo
cp -r $src/* .
hugo --baseUrl="http://localhost:5000"
# Render math in HTML and XML files.
find public/ -regex "public/.*\.html" | xargs ruby $converter
# Output result
mkdir $out
cp -r public/* $out/