Replies: 2 comments 5 replies
-
just to be pedantic, we do include
I guess it would probably be easiest for them to get generated by a background job and then pushed to S3, so that we don't have to generate them dynamically.
first glance feedback: the download number has a high update frequency, but we probably wouldn't want to rerender these images very often, so I'm not sure whether we should include it in the image.
let me know what you need :) |
Beta Was this translation helpful? Give feedback.
-
Here's what I can do right now:
I think this feature needs some experimenting, in particular to figure out whether performance impact is within reason. Actually running the image generation job, storing the images, and configuring CDN is something that is going to be hard for me. I'm aware the crates.io team is understaffed, and as such am offering my help with any of the other tasks, but I won't be able to do them independently as it stands. With some clear instructions I do expect to be able to figure out most of it, though |
Beta Was this translation helpful? Give feedback.
-
Crates.io currently doesn’t have support for the Open Graph Protocol (https://ogp.me/), meaning that when linking to a crate on social media, a default image that is not too informative gets shown. To improve this situation, support for Open Graph metadata should be added to the HTML served from crate pages.
As it turns out, crates.io’s static HTML index file is served by the backend, and introducing a simple HTML template could enable support for the Open Graph protocol relatively trivially. I’d be happy to open a PR that adds support if desired. Actually generating the referred-to images can be left to a separate service, for which I have already written a small prototype. I’ve published that prototype here.
Although performance might be negatively affected by having the backend render HTML specific to a crate page, the setup could benefit greatly from caching throughout the stack.
With some pointers from the team, I’ll gladly work on implementing this.
Beta Was this translation helpful? Give feedback.
All reactions