Coding Stephan

Every project needs a badge

You just created a new open-source project. Great, you rock! A lot of repositories have these nice images showing dynamic details of the repository. How does that work? By using these dynamic badges you can really make your repository stand out.

LinkedIn Profile Twitter follow Link Mastodon Blog

Github Readme in Markdown

Styling the readme of your repository, will require a file to exist in your repository. If you created a new repository on on of the questions is, Add a README file. If you select this option you get a somewhat empty README file created for you.

Create github repository

Markdown is a way to quickly format text without the need to write html. This post is not on how to create a Readme, there are other resources available for that.

Badges please

I’m no designer, luckily there is they have badges that show (almost) realtime statistics or information on a repository. They have a lot so I suggest you to browse through them.

Github Issues

GitHub issues

A lot of repositories show the number of open issues. To show a badge with the number of open issues you just add the following code to your repository:

![GitHub issues](

or this code if you want it to be a link to the repository (in case the README is also shown in some package manager for instance.):

[![GitHub issues](](

Custom Badge

You can also use to create custom badges, it’s a matter of changing some text in the url.

custom badge

![custom badge](
![custom badge]({textInGray}-{textInColor}-{color}?style=for-the-badge)

In my year review I used a badge for some Power Automate flow I shared with my followers. It just makes a readme look cool. Check the &logo=... part of the url.

custom badge with logo

![custom badge with logo](

They just integrated with SimpleIcons to immediately support almost all the logos you can imagine. That extra logo in the badge really makes it shine.

Re-using badges

Personally I always use reference links of badges with their links that makes it easy to change all the links at once if you use a single badge multiple times on the same page.

LinkedIn Profile Link Mastodon Follow on Twitter Check my blog

Use this code everywhere you want to use the badges:

[![LinkedIn Profile][badge_linkedin]][link_linkedin]
[![Link Mastodon][badge_mastodon]][link_mastodon]
[![Follow on Twitter][badge_twitter]][link_twitter]
[![Check my blog][badge_blog]][link_blog]

And add the required reference links all the way to the bottom of the markdown file.


Getting the mastodon id for the badge requires using this tool.

Styling the badges has five styles available for you to use. I just prefer the for-the-badge style, so that is in all the sample badges.

If you prefer one of the other styles, just change the style parameter in the badge url to the preferred one.

Final notes

The dynamic badges (those with data inside) are always loaded from the external server. Some users might have privacy concerns with this. The same counts for the static images, but you could download those and serve them directly from your repository.

Also if is down, your readme might look strange. Be sure to add alt texts to all the badges, which is a great idea from an accessibility point of view anyway.

Please go ahead and make your README look awesome with these small badges.