ocaml.org
ocaml.org copied to clipboard
OG images for OCaml Packages
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
Task:
- determine OCaml libraries that can generate .png or .jpg images like this
- create an endpoint, which, given a package name and version, generates the image and serves it
- add HTML meta tags that tell social networks to use the image
og:image
twitter:image
@sabine @tmattio I'd love to tackle this one next.
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.
Got it. I'll do a research and we can discuss the results. Is there any "design" for the cards?
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.
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