Jazz up your online software documentation, GitHub or Web pages with shields ( badges )

arjun dhar
3 min readApr 16, 2020

--

What are shields (aka badges)?

You may search them as badges or shields. They represent status and summaries, credentials on a WebPage and the most popular use on GitHub pages. They certainly look cool; like the earnings of a soldier on a uniform. And that’s what they exactly are, for your GitHub page. Other than the cool factor, shields improve the credibility of the project on first glance and summarize diligence and sincerity towards the repository.

For ease, we assume shield and badge are inter changeable and will use the word “shield” for the rest of this blog.

A shield has three aspects: <Label>:<Value> ; <Link>

The label is a static text or raster. Some shields providing an icon in the label part.

The value can be a static text value, raster, vector or even a combination.

A link can either be a simple status link or link to a site that validates and credits your badge. A status link may open to a page with a cached version of the badge representing the raster or vector SVG, while a service backed one may even open to a report giving the details behind the badge summary. What a link opens to is open to the service.

Types of shield values and shield services

Please note that the Shield generator service is just a URL and can be used anywhere, not just on the platform generating the shield.

Create a badge on GitHub

Since you now understand what a Shield Service is, lets see a practical example of a URL using such a service on GitHub. In the following example the dynamic elements are in bold:

https://github.com/<organization-or-user-name>/<repo name>/workflows/<name of my CI/CD action in GitHub>/badge.svg?event=push

Am sure many will still be wondering what the place holders are, so here is a practical animation of usage from one of my repo’s:

Create a badge on Shields.io

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

arjun dhar
arjun dhar

Written by arjun dhar

Software development enthusiast since I was 8 yrs old. Love communicating on anything regarding innovation, community development … ∞

No responses yet

Write a response