Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ci: nothing checks images/og-card.jpg still matches build-og-card.mjs

Aperta
#172 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
50/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, javascript, nodejs

Direzione di ricerca

Leggi scripts/build-og-card.mjs, render.yml, css.yml e la discussione correlata a #171; esegui prima npm run og-card e confronta l’immagine generata con images/og-card.jpg. Stabilisci se un confronto byte-exact o percettivo è affidabile su CI, quindi integra il controllo nel workflow. Il lavoro è completato quando CI rileva un JPEG committato non aggiornato senza risultati instabili.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ci infra

Split out of the #168 review.

assets/css/main.css is generated-and-committed, and css.yml runs npm run css:check so the committed output can't go stale. images/og-card.jpg is generated-and-committed the same way by scripts/build-og-card.mjs, and nothing checks it at all — the script's own header says so:

Not part of CI, and nothing checks the committed JPEG still matches this source: run it by hand after changing the headshot or the wording, and commit the result alongside.

So editing NAME, DOMAIN, ROLES or the card's CSS and forgetting npm run og-card leaves the site shipping the old card, and the only signal is someone looking at a LinkedIn preview. The same edit silently desynchronises og:image:alt, which names the roles the card prints.

This is checkable: during the #168 review, npm run og-card reproduced the committed images/og-card.jpg byte for byte (md5 17932ab290c6e059a50d7a79e56ecabe), so a css:check-style hook is viable in principle:

"og-card:check": "npm run og-card && git diff --exit-code -- images/og-card.jpg"

Two things to settle before wiring it up:

  • Is byte-exactness reproducible off this machine? It was stable across four local runs, but it depends on the Chrome build's text rasterisation and on libvips/mozjpeg versions. If a CI runner's Chrome differs, a byte comparison will flap. A perceptual comparison (decode both, compare mean absolute difference under a threshold) would be robust where a byte check isn't.
  • Where it runs. It needs Chrome and it writes into the repo tree, so it fits render.yml (which already has Chrome) better than a pre-commit hook.

Related: #171 tracks sharing the headless-Chrome plumbing between check-render.mjs and build-og-card.mjs; doing that first would make this cheaper.

Lingua principale
HTML
Stelle
0
Fork
0
Merge medio
8h 17m
PR unite (30g)
58

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di laywill/laywill.github.io

Tutte le issue di laywill/laywill.github.io

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.