Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get colored keyword labels in readme.md on GitHub?

This might be a stupid question, but I can not figure out how to add colored keyword labels to my readme.md file

See example of what I am after here https://github.com/reactstrap/reactstrap

How to get similar to these that you can see on the page at the link above: CDNJS NPM Version Build Status Coverage Status License

like image 891
Thomas James Thorstensson Avatar asked Sep 17 '25 11:09

Thomas James Thorstensson


1 Answers

Those aren't labels - they're "badges" provided by CDNJS, NPM etc.

They're really just image links that happen to look like colored text. Here's the markdown involved for CDNJS for example:

[![CDNJS](https://img.shields.io/cdnjs/v/reactstrap.svg)](https://cdnjs.com/libraries/reactstrap)

A lot of CI and package systems have instructions for how to embed badges like this. For example, the Travis docs for the feature are here.

It looks like shields.io is a service dedicated to providing images like this for all kinds of services.

There's nothing particularly magical about this, of course. They're just Markdown image links. You could link to any image, including one generated by your own server somewhere, if you want. It's just that CI and packaging systems have adopted this pretty widely for use in GitHub and similar systems.

like image 89
Jon Skeet Avatar answered Sep 21 '25 11:09

Jon Skeet