This Jekyll plugin allows you to add a shields.io badge in your blog without forming very long URLs - instead, the properties are set via JSON.
C. Plug
MIT