website/justfile
2025-02-19 15:39:30 +01:00

36 lines
957 B
Makefile

root := justfile_directory()
build := root / "build"
# Build static website
build: jj-slides
tup build
clean:
git clean -dxf build
# Generate dependency graph as PNG file
graph:
tup graph . | dot -Tpng > graph.png
upload-resume:
scp ~/Hub/Personal/Jobs/resume_2020-09.pdf fabs@ffreling.com:ffreling.com/files/resume.pdf
# Deploy up-to-date website to webserver
deploy: build
rsync --checksum --copy-links -ave 'ssh' \
--exclude-from=rsync_excludes.txt \
build/* fabs@ffreling.com:/var/www/ffreling.com/
preview: build
python3 -m webbrowser -t "file://{{root}}/build/index.html"
JJ_SLIDES_SRC := root / "articles/jujutsu/slides.md"
JJ_SLIDES_OUT := build / "articles/jujutsu/jujutsu_slides.pdf"
jj-slides:
npx @marp-team/marp-cli@latest --allow-local-files \
--bespoke.progress {{ JJ_SLIDES_SRC }} --pdf \
--output {{ JJ_SLIDES_OUT }}
jj-slides-watch:
ls {{ JJ_SLIDES_SRC }} | entr just jj-slides