When working with PyPI etc., I like to use version badges, especially for 
indexing tools, but I didn't see any suitable option for that with Nimble, [so 
I created mine](https://github.com/amkrajewski/nimble-badge). It has been 
stable for about a week now, updating every 12 hours.

Coincidentally, @daylinmorgan just posted a solution 
[here](https://forum.nim-lang.org/t/10522) using _shields.io_ , but I see them 
as complementary. [Their 
solution](https://img.shields.io/github/v/tag/daylinmorgan/forge?filter=v*&logo=Nim&label=nimble&labelColor=black&color=%23f3d400)
 certainly wins in cross-service consistency and reliability, while mine wins 
the ✨ beauty contest ✨, can easily be modified to any payload, and deployed 
statically without the internet. You can find my repo here 
<https://github.com/amkrajewski/nimble-badge>

In short, I forked the [yglukhov's 
repo](https://github.com/yglukhov/nimble-tag) with a graphical design by Amy 
Shaw. Then I:

  * Added version field to the badge's SVG and automated adjustment based on 
the _nim-lang/packages_ submodule with a small Nim script.
  * Automated embedding of a hyperlink to the repository into the SVG (note 
that some text renderers disable it)
  * Created some half-decent decent README, including how 30s instruction on 
how to deploy it yourself.



It is dead simple to use. SVG for every badge is statically hosted, and you 
just use your package name. E.g. for arraymancer,
    
    
    <img 
src="https://raw.githubusercontent.com/amkrajewski/nimble-badge/master/badges/arraymancer.svg";
 height="24">
    
    Run

or add your own payload by replacing `v1.11.11` in the `nimble.svg` with 
something you want to share with the world

I hope you guys find it useful 🙂 And cheers to Nim devs who created such a 
beautiful language 🍻

Reply via email to