Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A shields.io API #12

Open
mightyiam opened this issue Mar 9, 2015 · 6 comments
Open

A shields.io API #12

mightyiam opened this issue Mar 9, 2015 · 6 comments

Comments

@mightyiam
Copy link
Contributor

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

Can we support that across the badges?

@jonschlinkert
Copy link
Member

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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 mightyiam changed the title Shields.io styles A shields.io API May 10, 2015
@mightyiam
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@AndersDJohnson
Copy link
Member

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants