Version Badges for Rust Blog posts


#1

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: http://words.steveklabnik.com/community-versions-for-rust


#2

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


#3

It could, yeah. But it’s not actually an image, it’s an SVG: https://github.com/steveklabnik/rust-community-versions/blob/gh-pages/_layouts/post.html#L20

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.


#4

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


#5

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="http://my.site/badge.svg#from=1.1&to=1.3" /> would be possible. No PRs to foreign repos or anything needed.


#6

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


#8

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.


#9

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