Add 1-page short CV variant, ORCID, profile photo, pre-commit hook
- cv-short.tex: two-column paracol layout (66/34) with curated content
in the left column and an "at a glance" sidebar on the right.
Locally tightens parskip, \cvsection and \cvevent so everything fits
on a single A4 page, and redefines the sidebar list helper \sbitem
to replace altacv's non-wrapping tikz \cvtag in the narrow column.
- chapters/short/{current,education,grants-selected,products,
pubs-selected,sidebar}.tex: hand-curated highlight content
(top 6 publications, top 6 grants, condensed two-line products,
stats + recognition + leadership + research-focus sidebar blocks).
- chapters/header.tex / preamble.tex: ORCID 0000-0001-7512-8541
via a new \orcid info field (faOrcid icon); blog field for
giorgio.gilest.ro.
- images/gilestro.png: profile photo, used only by the short CV via
altacv's circular \photoR.
- hooks/pre-commit + `make install-hooks`: rebuilds every variant on
any .tex/.cls/Makefile change, aborts the commit on build failure,
and stages refreshed PDFs into pdf/.
- Makefile: short target, hook-install target, dep glob extended to
chapters/short/*.tex so the short build refreshes when its sources
change.
This commit is contained in:
parent
7e30ed5b48
commit
f8563e1336
12 changed files with 239 additions and 5 deletions
43
hooks/pre-commit
Executable file
43
hooks/pre-commit
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
# Pre-commit hook: rebuild every CV variant whenever LaTeX sources change.
|
||||
#
|
||||
# Activated via: git config core.hooksPath hooks
|
||||
# (or run once: make install-hooks)
|
||||
#
|
||||
# Behaviour:
|
||||
# - Only fires when staged changes touch .tex sources, the Makefile,
|
||||
# or the vendored .cls. Other commits skip the rebuild.
|
||||
# - Runs `make all` (i.e. cv-full + cv-short).
|
||||
# - Aborts the commit if the build fails.
|
||||
# - Copies the rebuilt PDFs to ./pdf/ (tracked) and stages them so each
|
||||
# commit ships with up-to-date PDFs alongside the source.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Skip if no staged file matches a "build input" pattern.
|
||||
STAGED=$(git diff --cached --name-only --diff-filter=ACMR || true)
|
||||
if ! echo "$STAGED" | grep -qE '\.(tex|cls)$|^Makefile$'; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "[pre-commit] LaTeX source changed -- rebuilding all CV variants..."
|
||||
|
||||
# Build everything. `make all` covers full + short.
|
||||
if ! make all >/tmp/cv-build.log 2>&1; then
|
||||
echo "[pre-commit] BUILD FAILED -- commit aborted." >&2
|
||||
echo "[pre-commit] See /tmp/cv-build.log for details." >&2
|
||||
tail -30 /tmp/cv-build.log >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Publish the rebuilt PDFs to the tracked ./pdf/ directory and stage them.
|
||||
mkdir -p pdf
|
||||
for variant in cv-full cv-short; do
|
||||
if [[ -f "build/${variant}.pdf" ]]; then
|
||||
cp "build/${variant}.pdf" "pdf/${variant}.pdf"
|
||||
git add "pdf/${variant}.pdf"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[pre-commit] Rebuild OK, pdf/ updated and staged."
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue