Files
Yggdrasil/Justfile
T
2026-10-10 20:39:46 +02:00

42 lines
1.4 KiB
Makefile

calepin-version := "0.0.61"
typst-version := "0.15.1"
# Print available recipes
default:
@just --list
# Download and verify the pinned toolchain
tools:
mkdir -p tools
cd tools && \
if [ ! -f calepin ]; then \
curl -sL "https://github.com/vincentarelbundock/calepin/releases/download/v{{calepin-version}}/calepin-x86_64-unknown-linux-gnu.tar.xz" -o calepin-x86_64-unknown-linux-gnu.tar.xz; \
curl -sL "https://github.com/vincentarelbundock/calepin/releases/download/v{{calepin-version}}/calepin-x86_64-unknown-linux-gnu.tar.xz.sha256" -o calepin-x86_64-unknown-linux-gnu.tar.xz.sha256; \
sha256sum -c calepin-x86_64-unknown-linux-gnu.tar.xz.sha256; \
tar -xf calepin-x86_64-unknown-linux-gnu.tar.xz --strip-components=1 calepin-x86_64-unknown-linux-gnu/calepin; \
rm calepin-x86_64-unknown-linux-gnu.tar.xz calepin-x86_64-unknown-linux-gnu.tar.xz.sha256; \
fi
cd tools && \
if [ ! -f typst ]; then \
curl -sL "https://github.com/typst/typst/releases/download/v{{typst-version}}/typst-x86_64-unknown-linux-musl.tar.xz" -o typst.tar.xz; \
tar -xf typst.tar.xz --strip-components=1 typst-x86_64-unknown-linux-musl/typst; \
rm typst.tar.xz; \
fi
# Build the site
build:
PATH="$PWD/tools:$PATH" calepin compile site public
# Preview the site locally
preview:
PATH="$PWD/tools:$PATH" calepin serve public
# Watch for changes and preview
watch:
PATH="$PWD/tools:$PATH" calepin watch site public --serve
# Clean the output directory
clean:
rm -rf public