22

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?

Pyves
  • 6,333
  • 7
  • 41
  • 59
Greg
  • 10,696
  • 22
  • 68
  • 98
  • Can you include some of the markdown that you've tried in your question? – cartant Aug 26 '16 at 23:36
  • This is (working) bintray tag: ```[ ![Download](https://api.bintray.com/packages/blocke/releases/scalajack/images/download.svg) ](https://bintray.com/blocke/releases/scalajack/_latestVersion)```. – Greg Aug 27 '16 at 15:41
  • This is what I'm trying (cut 'n paste from shields.io): ```[![Bintray](https://img.shields.io/bintray/v/asciidoctor/maven/asciidoctorj.svg?maxAge=2592000)](https://bintray.com/blocke/releases/scalajack)```. I know something important is missing--just don't know what it is. – Greg Aug 27 '16 at 15:41

1 Answers1

20

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

Tanin
  • 1,853
  • 1
  • 15
  • 20
cartant
  • 57,105
  • 17
  • 163
  • 197
  • 4
    Be aware that by specifying `maxAge=2592000` the HTTP cache lifetime will be set to 30 days. You might want to use a smaller value. – cartant Aug 28 '16 at 05:38