GitHub Repository Card for sharing, but it doesn’t have good support for Chinese and doesn’t support line breaks.
Originally, I planned to create my own using @vercel/og, but I accidentally discovered that GitHub provides comprehensive and beautiful Open Graph images on Twitter. So, I wrote a script to extract and use them for blog previews.
In addition to repositories, GitHub’s Open Graph also supports previews for Issue, Pull Request, Discussion, and Commit modules.
Modify .com
to .html.zone
on any GitHub page.
For example, https://github.com/vercel/next.js => https://github.html.zone/vercel/next.js.
The code has been shared on GitHub for those interested to explore.