Skip to content

fix(talk): rasterize slides at 2x and trim the speaker links - #478

Merged
tieubao merged 2 commits into
mainfrom
fix/talk-slide-sharpness
Nov 9, 2026
Merged

tieubao merged 2 commits into
mainfrom
fix/talk-slide-sharpness

Conversation

@tieubao

@tieubao tieubao commented Nov 9, 2026

Copy link
Copy Markdown
Member

What

  • Talk slides rasterize at a 3200 px long edge (2x of the 1600x900 page), webp q80, 500 KB cap. A slide shown wider than about 800 CSS px blurred on a 2x screen (Studio Display) at 1600 px.
  • post-check.mjs T5 accepts a long edge of 1200 to 3200 px and 500 KB. Rule 45 in media-standard.md, the T5 row in post-rubric.md, contribute-to-memo.md, publish-a-talk.md, the README media line, and the talk-build.mjs header match.
  • compress-media.sh keeps a 3200 px edge and a 500 KB warning for assets/*/slides/slide-*. Without this, media-sync would shrink every slide back to 1600 px on merge and the fix would not reach the site.
  • Speaker slide: the links row renders two links at most (cap lives in fillProfiles in talk-build.mjs, since profile.html only holds the placeholder). speakers/tieubao.json keeps truonghan.com and github.com/tieubao.
  • og.png stays 1200x630. No existing deck's rasters are rebuilt or touched.

Cap data

Reference deck publish-a-talk (13 slides) built in a scratch copy, rasterized from its deck.pdf at 3200 px, webp q80:

Edge Min Median Max
1600 px 28.8 KB 34.2 KB 44.6 KB
3200 px 60.9 KB 72.0 KB 94.7 KB

The cap is 500 KB: about 5x the reference maximum, for screenshot-heavy slides, and 40 slides at the cap stay under the 25 MB per-post limit.

Test plan

  • node --test _meta/scripts/post-check-talk.test.mjs _meta/scripts/talk-build-meta.test.mjs: 28 pass, 0 fail (two new T5 cases: 3200 px passes, 4000 px warns)
  • Scratch deck from talk-build.mjs --init --speaker tieubao: slide-02.webp is 3200x1800, og.png 1200x630, profile shows two links
  • Negative control: a 4000x2250 slide prints WARN T5 ... slide-01.webp is 4000x2250; the long edge is 1200 to 3200 px; a 3200 px slide beside it does not warn
  • compress-media.sh: a 3200 px slide stays 3200 px, an ordinary image still caps at 1600 px

Follow-up (not in this PR)

Existing decks keep their 1600 px rasters until someone reruns talk-build.mjs on them. The reference deck's own deck-src slides 05 and 11 still say "1600, 200 KB"; they change with a rebuild of that deck.

Slides rasterize at a 3200 px long edge (2x of the 1600x900 page), webp q80, 500 KB cap, so a slide shown wider than 800 CSS px stays sharp on a 2x screen. post-check T5 accepts 1200 to 3200 px and 500 KB. compress-media.sh keeps 3200 px for slides, or media-sync would shrink them back to 1600 on merge. The speaker slide renders two links at most; tieubao keeps truonghan.com and github.com/tieubao.
@tieubao
tieubao merged commit befc797 into main Nov 9, 2026
1 check passed
@tieubao
tieubao deleted the fix/talk-slide-sharpness branch November 9, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant