fix(client-handover): PDF render bugs — marked CLI, white cover, PNG logo

Three bugs surfaced on the LIVRAISON.pdf test render:

1. **MD→HTML conversion** — host had no pandoc, no python-markdown, fell
   back to `npx marked < "$src"`. marked CLI 16.x ignores stdin and
   dumps its own cli.js source. Resulting PDF body = marked's binary
   source (`#!/usr/bin/env node`, `Marked CLI`, copyright). Fix:
   `npx --yes marked --gfm -i "$src"` (file path via -i, not stdin).

2. **Cover background** — original cream `#F5F0EB` + 8mm green stripe
   was washed out. Iterated to white-pure bg with subtle radial
   sage/forest tints, black-deep title, green-forest accents
   (eyebrow, meta labels, footer, border). Solid green-dark tried
   first then rejected (too heavy for long client-facing doc).

3. **Default logo** — SVG `logo-horizontal.svg` rendered cream-toned,
   blended into bg. Switched LOGO_URL default to
   `https://zenquality.fr/assets/logo-horizontal-1024.png`.

Also added test-artifact gitignore rules for LIVRAISON.* / HANDOVER.*
project-local renders.

Verified: regenerated LIVRAISON.pdf → 164 KB, 19 pages, full content
rendered, white cover with black title + green-forest accents +
visible PNG logo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
bastien
2026-05-08 19:57:08 +02:00
co-authored by Claude Opus 4.7
parent 591a035ec6
commit b447a892b1
4 changed files with 36 additions and 26 deletions
@@ -104,7 +104,7 @@ PROJECT_PERIOD_RESOLVED="${PROJECT_PERIOD:-—}"
PROJECT_URL_RESOLVED="${PROJECT_URL:-—}"
COVER_TITLE_RESOLVED="${COVER_TITLE:-$PROJECT_NAME_RESOLVED}"
COVER_SUBTITLE_RESOLVED="${COVER_SUBTITLE:-$DEFAULT_SUBTITLE}"
LOGO_URL_RESOLVED="${LOGO_URL:-https://zenquality.fr/logo-horizontal.svg}"
LOGO_URL_RESOLVED="${LOGO_URL:-https://zenquality.fr/assets/logo-horizontal-1024.png}"
if command -v date >/dev/null 2>&1; then
if [ "$LANG_CODE" = "fr" ]; then
@@ -135,7 +135,9 @@ print(markdown.markdown(
return
fi
if command -v npx >/dev/null 2>&1; then
npx --yes marked < "$src"
# marked CLI 16.x ignores stdin and dumps its own cli.js source —
# always pass the file via -i to get correct output.
npx --yes marked --gfm -i "$src"
return
fi
echo "error: no Markdown converter available (need pandoc, python3+markdown, or npx)" >&2