Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add badges/shields to github repos?

Tags:

I see sites like shields.io or similar and they have these clips of markdown to show badges...but if I cut 'n paste these it's just the demo value. How can I make it "real".

For example Bintray has their own "Latest Version Badge" markdown that works fine. I think the "shields" sites are trying to standardize the look 'n feel of these badges and they claim Bintray is one of their supported services.

How can I actually use their nice badge and pull my version data from Bintray?

like image 348
Greg Avatar asked Aug 26 '16 22:08

Greg


People also ask

How do I add a badge to my GitHub repository?

To generate a badge for your project, you first need to add the Depfu app to your GitHub account and then visit this link to generate the badge, as shown in the image below: Once all the needed badges are generated, you can copy the URLs' or the badges' markdown text and add it to the top of the readme file.

How do I add action badges to GitHub?

To add a workflow status badge to your README.md file, first find the URL for the status badge you would like to display. Then you can use Markdown to display the badge as an image in your README.md file. For more information about image markup in Markdown, see "Basic writing and formatting syntax."


1 Answers

A Bintray shield would look somthing like this:

[![Bintray](https://img.shields.io/bintray/v/asciidoctor/maven/asciidoctorj.svg?maxAge=2592000)](https://bintray.com/asciidoctor/maven/asciidoctorj)

There are two URIs in the shield the first is for the image and the second is for navigation upon clicking the image. Both URIs include asciidoctor/maven/asciidoctorj - a Bintray repository. If you replace both occurrences of asciidoctor/maven/asciidoctorj with your repository, you should have a working shield:

[![Bintray](https://img.shields.io/bintray/v/blocke/releases/scalajack.svg?maxAge=3600)](https://bintray.com/blocke/releases/scalajack)

Bintray

like image 80
cartant Avatar answered Sep 21 '22 08:09

cartant