Skip to content

build: render the dev.to and Medium covers from the same source - #13

Merged
MeAkib merged 1 commit into
mainfrom
docs/link-the-demo
Oct 3, 2026
Merged

MeAkib merged 1 commit into
mainfrom
docs/link-the-demo

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 3, 2026

Copy link
Copy Markdown
Owner

dev.to crops a cover to roughly 1000x420, and Medium wants 1500px or wider, so the 1200x630 Open Graph card suits neither. Cropping it to 2.4:1 slices the install line in half.

make-og.mjs now renders three images from one set of words: the card at 1200x630, a 1000x420 cover for dev.to, and the same frame at 2x for Medium. The two aspect ratios get their own layout rather than one being a crop of the other, because 420px of height does not fit a heading, three lines of prose, two rows of pills and an install line.

Tile heights are scaled per frame with a bleed factor, so the columns still run off the bottom edge at every size — scaling by height alone left the shortest column stopping inside the frame, with a band of background under it that looks like a failed image.

og.png is byte-identical to the version already committed; only the script around it changed.

What does this change?

How to see it

Checks

  • npm test passes
  • npm run format run on the files I touched
  • Added a test, if this fixes a bug — one that fails before the change and passes after
  • npm run verify:compat, if I changed anything public (builds a real app on Angular 17–22)

dev.to crops a cover to roughly 1000x420, and Medium wants 1500px or
wider, so the 1200x630 Open Graph card suits neither. Cropping it to
2.4:1 slices the install line in half.

make-og.mjs now renders three images from one set of words: the card at
1200x630, a 1000x420 cover for dev.to, and the same frame at 2x for
Medium. The two aspect ratios get their own layout rather than one being
a crop of the other, because 420px of height does not fit a heading,
three lines of prose, two rows of pills and an install line.

Tile heights are scaled per frame with a bleed factor, so the columns
still run off the bottom edge at every size — scaling by height alone
left the shortest column stopping inside the frame, with a band of
background under it that looks like a failed image.

og.png is byte-identical to the version already committed; only the
script around it changed.
@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
masonry-angular Ready Ready Preview Oct 3, 2026 1:09pm UTC
masonry-angular-examples Ready Ready Preview Oct 3, 2026 1:09pm UTC

This branch was successfully deployed

2 active deployments
Preview – masonry-angular — 6dc6f5b4 Deployed Oct 3, 2026 by vercel[bot]
Preview – masonry-angular-examples — 6dc6f5b4 Deployed Oct 3, 2026 by vercel[bot]
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