verbose / readme-badges

Readme badge templates.
MIT License
5 stars 10 forks source link

A shields.io API #12

Open mightyiam opened 9 years ago

mightyiam commented 9 years ago

Shields.io provides several styles (see "Styles" section).

Can we support that across the badges?

jonschlinkert commented 9 years ago

Meaning use shields for all the badges? I think we would need to, to support the styles. Seems like this would make things a lot simpler too.

Maybe we change the built-in badge helper to render shields badges, so we wouldn't need to use any actual templates. I only avoided that in the past b/c the badges used completely different syntaxes and the logic was getting complicated. thoughts?

mightyiam commented 9 years ago

Perhaps a separation between the badge identity and the renderer?

A badge identity would be 'travis', 'standard', etc.

A badge rendered would be 'shields', 'style1', 'style2', etc.

I'm not sure whether the default renderer should be one of the original styles or 'shields'.

mightyiam commented 9 years ago

As a start, I would like to have a generic way to consume a http://shields.io/ badge, implementing all their API, which is: screenshot_2015-05-10_20-00-07

They also provide a style parameter: screenshot_2015-05-10_20-02-50

It would be nice to be able to set a default style.

I'm not sure how useful this is: screenshot_2015-05-10_20-03-58

mightyiam commented 9 years ago

Actually, their API is two main things.

One is all the built in badges, like https://img.shields.io/travis/joyent/node.svg.

And the other is the custom badge.

And the styles and label params can be used with both built-in and custom badges.

Docs say that a .json and a .png is also available for each of the badges. I don't see the relevance of .json for us at all. I'm not sure about .png either.

mightyiam commented 9 years ago

This can look better, using shields.io: screenshot_2015-05-12_18-59-46

AndersDJohnson commented 9 years ago

+1