Version Badges for Rust Blog posts

I've taken a project from Ember and modified it for Rust. It gives you version badges for your blog posts, to help other Rustaceans know what version of Rust your post is about. Check it out: Community Versions for Rust | Next.js Blog Example with Markdown


Why does it need an iframe though? Shouldn't an img element suffice? I'm always wary of including iframes in my documents.

It could, yeah. But it's not actually an image, it's an SVG: rust-community-versions/post.html at gh-pages · steveklabnik/rust-community-versions · GitHub

I don't think you could do the image based solution without a bunch of server-side code to generate the images, whereas this is just GitHub pages.

Eh, could the Jekyll template generate an SVG file? It should then can be put into <img>.

You could actually make a static svg file which would show different versions depending on URI arguments via SVG scripting. Then a simple <img src="" /> would be possible. No PRs to foreign repos or anything needed.


Seems good! I would raise it with the upstream project.

The idea seem great but, since the goal is to have long time support by all the community, It seem to me better to use the rust team account instead of a personal account.

1 Like

I would be happy to move it, but I want to see if people actually want this before doing something "official."