Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social card improvements #143

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open

Social card improvements #143

wants to merge 32 commits into from

Conversation

andersy005
Copy link
Member

@andersy005 andersy005 commented Mar 8, 2023

This PR is an attempt at using the @vercel/og library to generate OpenGraph images for our blog posts dynamically. Once merged, this will eliminate the need to manually run npm run build-cards plus uploading social cards to s3 when updating our blog, streamlining our maintenance process.

dependencies:

@vercel
Copy link

vercel bot commented Mar 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 7:38pm

@Shane98c Shane98c marked this pull request as ready for review January 7, 2025 19:14
@andersy005
Copy link
Member Author

andersy005 commented Jan 7, 2025

@Shane98c, i'm so glad to see this brought to completion 🎊 👏🏽 !! the cards look great

@andersy005 andersy005 requested a review from katamartin January 7, 2025 19:22
Copy link
Member

@katamartin katamartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern generally looks good to me!

@Shane98c how were you thinking about rolling this out? It could be nice to test out the full integration before merging (i.e. to test performance). But I guess we could also merge this as-is and then make the layouts + build-cards updates in subsequent PRs.

utils/generate-metadata.js Outdated Show resolved Hide resolved
pages/cards/[id].js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
`

// Write the metadata file
fs.writeFileSync(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a flag that once we have this change in blog and research, we should also update drafts to share the same pattern!

Copy link
Member

@katamartin katamartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great to me!

Do we want to clean up the old card metadata values so that we're consistently using the og route or leave that for a potential followup?

.gitignore Outdated
cards
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this now too!

Comment on lines +34 to +37
return new ImageResponse(component, {
...options,
fonts,
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So slick!

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.

3 participants