ocaml / ocaml.org

The official OCaml website.
https://ocaml.org
Other
161 stars 320 forks source link

OG images for OCaml Packages #1786

Open tmattio opened 10 months ago

tmattio commented 10 months ago

Task:

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 commented 10 months ago

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 commented 7 months ago

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

sabine commented 7 months ago

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 commented 7 months ago

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

sabine commented 7 months ago

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 commented 7 months ago

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