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

OG images for OCaml Packages #1786

Open
tmattio opened this issue Nov 21, 2023 · 6 comments
Open

OG images for OCaml Packages #1786

tmattio opened this issue Nov 21, 2023 · 6 comments

Comments

@tmattio
Copy link
Collaborator

tmattio commented Nov 21, 2023

Task:

  • Implement an endpoint that renders a social media image for a package.
  • insert og:image and twitter:image tags on the package pages' head to reference this image, so that social media platforms will use it to render the card as preview.

https://www.figma.com/file/J0w4b9exaHhVpvabKoGqTn/Design-Github-Issues?type=design&node-id=552%3A109&mode=dev&t=GyDyisG71RSU3F46-1

v1_twitter_package_banner_1024x512px

@sabine
Copy link
Collaborator

sabine commented Nov 27, 2023

Task:

  1. determine OCaml libraries that can generate .png or .jpg images like this
  2. create an endpoint, which, given a package name and version, generates the image and serves it
  3. add HTML meta tags that tell social networks to use the image og:image twitter:image

@kiyov09
Copy link
Contributor

kiyov09 commented Feb 16, 2024

@sabine @tmattio I'd love to tackle this one next.

@sabine
Copy link
Collaborator

sabine commented Feb 19, 2024

Hey @kiyov09 that would be awesome! The trickiest thing about this is identifying which packages / tools could be used.

As I understand, it's best to create JPG images, since not all social sites deal well with SVG images. However, one possible path would be to render SVG and convert that to JPG with some library or command line tool.

@kiyov09
Copy link
Contributor

kiyov09 commented Feb 19, 2024

Got it. I'll do a research and we can discuss the results. Is there any "design" for the cards?

@sabine
Copy link
Collaborator

sabine commented Feb 20, 2024

When we know what data to list, I can give a napkin sketch to the designer to turn that into a design - but I haven't really thought about that yet.

I think taking inspiration for GitHub cards here, we won't be doing anything wrong.

@sabine
Copy link
Collaborator

sabine commented Feb 20, 2024

We have a design now at

https://www.figma.com/file/J0w4b9exaHhVpvabKoGqTn/Design-Github-Issues?type=design&node-id=552%3A109&mode=dev&t=GyDyisG71RSU3F46-1

v1_twitter_package_banner_1024x512px

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants