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

Convenient way to provide custom templates #3500

Closed
goranmoomin opened this issue May 29, 2019 · 2 comments
Closed

Convenient way to provide custom templates #3500

goranmoomin opened this issue May 29, 2019 · 2 comments
Labels
npm-package Badge generation and badge templates

Comments

@goranmoomin
Copy link

📋 Description

I would like a convenient way to provide a new template without having to submit it on this repo. For example, if I have a homemade template like this, I can request https://img.shields.io/static/v1.svg?label=hello&message=world&color=success&url=https%3A%2F%2Fgist.githubusercontent.com%2Fpcr910303%2Ff4f4a518e0a5a50d7d1060d3259b9897%2Fraw%2Fd0b6e2df394aba541733a6d3e8a0ae485ad92dfa%2Fmodern-template.svg to get a badge based on the provided template.

@paulmelnikow
Copy link
Member

Hi! Thanks for the ask.

I don't think this is something we should support, for two reasons:

  1. DoT has a published security vulnerability and we're going to replace it with template literals (Move badge templates from doT → Template literals #2428), and I'd question the amount of security exposure relative to the amount of benefit in adding something like this.

  2. An explicit goal of Shields to provide consistency of badges. It's been argued that we should provide fewer formats, not more (see e.g. follow-on discussion in Add logo style badges #1478). I'd like to add an action button format (see Add an action button format #2824) though I'm not sure there is consensus on that.

In general I feel like we should at most support new formats when there is a compelling use case that doesn't make sense with the other formats.

My suggestion would be to render the badge yourself in something like Runkit or Now 2.0. If you need dynamic data from an existing badge, you can hit the Shields JSON endpoint.

@paulmelnikow paulmelnikow added core Server, BaseService, GitHub auth, Shared helpers npm-package Badge generation and badge templates and removed core Server, BaseService, GitHub auth, Shared helpers labels May 29, 2019
@goranmoomin
Copy link
Author

Okay, thanks for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm-package Badge generation and badge templates
Projects
None yet
Development

No branches or pull requests

2 participants