- Update pre-commit hook to compile cv.tex and cv_de.tex before generating webp - Add post-push hook to rsync PDFs to bocken.org:/var/www/static/ - Update documentation with new hook requirements and functionality
Git Hooks
This directory contains Git hooks for the CV project.
Installation
To install the hooks, run:
.githooks/install-hooks.sh
Or, configure Git to use this directory for hooks (Git 2.9+):
git config core.hooksPath .githooks
Available Hooks
pre-commit
Automatically compiles LaTeX files and generates WebP preview image.
Requirements:
pdflatex(from TeX Live or similar LaTeX distribution)pdftoppm(from poppler-utils)magick(ImageMagick)
The hook will:
- Compile
cv.texandcv_de.texto PDF if they've been modified or staged - Convert the first page of
cv.pdfto a WebP image - Save it as
img/cv.webp - Add the generated image to the commit
post-push
Automatically syncs compiled PDFs to bocken.org after pushing.
Requirements:
rsync- SSH access to
root@bocken.org
The hook will:
- Upload
cv.pdftoroot@bocken.org:/var/www/static/ - Upload
cv_de.pdftoroot@bocken.org:/var/www/static/(if exists)