Repository navigation
build: render the dev.to and Medium covers from the same source - #13
Merged
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 testpassesnpm run formatrun on the files I touchednpm run verify:compat, if I changed anything public (builds a real app on Angular 17–22)