![]() This commit adds support for issuestats.com, as requested in #351. The implementation is straight-forward, with the exception of the handling of 'not found' which currently returns text/html with code 200 (see hstove/issue_stats#38). The URL parsing is somewhat lax to allow future support for other hosting platforms which may not follow GitHub's user/repo URL scheme. It also passes through the `concise` query parameter, if present, which shortens the text a bit. Changes in v3: - Fix `concise` option assignment holdover missed in v2 changes. - Make `label` check null/undefined rather than falsey. Changes in v2: - Move type to first parameter and shorten to 1 character. - Change `concise` option from query param to optional path component - Make `color` check null/undefined rather than falsey. - Add try-catch around JSON value extraction and response, by request. Fixes: #351 Signed-off-by: Kevin Locke <kevin@kevinlocke.name> |
||
---|---|---|
ass-stubs | ||
logo | ||
spec | ||
templates | ||
.buildpacks | ||
.editorconfig | ||
.gitignore | ||
.travis.yml | ||
404.html | ||
badge.js | ||
CNAME | ||
colorscheme.json | ||
CONTRIBUTING.md | ||
coverage.svg | ||
Dockerfile | ||
favicon.png | ||
gh-badge.js | ||
index.html | ||
INSTALL.md | ||
LICENSE.md | ||
load-logos.js | ||
logo.svg | ||
lru-cache.js | ||
Makefile | ||
measure-text.js | ||
package.json | ||
phantomjs-svg2png.js | ||
README.md | ||
server.js | ||
suggest.js | ||
svg-to-img.js | ||
test.js | ||
try.html |
An image server for legible and concise information. Our Homepage | Twitter
- INSTALL – installation instructions.
- CONTRIBUTING – project contribution guidelines.
- SPECIFICATION – spec for the visual design of Shields badges.
- LICENSE – public domain dedication.
Make your own badges here! (Quick guide: https://img.shields.io/badge/left-right-f39f37.svg
.)
Solving the problem
Many GitHub repositories sport badges for things like:
Travis CI (build status) |
![]() |
Gemnasium (dependency checks) |
![]() |
Code Climate (static analysis) |
![]() |
RubyGems (released gem version) |
![]() |
As you can see from the zoomed 400% versions of these badges above, nobody is (really) using the same badge file and at normal size, they're hardly legible. Worst of all, they're completely inconsistent. The information provided isn't of the same kind on each badge. The context is blurry, which doesn't make for a straightforward understanding of how these badges are relevant to the project they're attached to and what information they provide.
The Shields solution
As you can see below, without increasing the footprint of these badges, I've tried to increase legibility and coherence, removing useless text to decrease the horizontal length in the (likely) scenario that more of these badge thingies crop up on READMEs all across the land.
This badge design corresponds to an old and now deprecated version which has since been replaced by beautiful and scalable SVG versions that can be found on shields.io.
Examples
What kind of metadata can you convey using badges?
- test build status:
build | failing
- code coverage percentage:
coverage | 80%
- stable release version:
version | 1.2.3
- package manager release:
gem | 1.2.3
- status of third-party dependencies:
dependencies | out-of-date
- static code analysis GPA:
code climate | 3.8
- SemVer version observance:
semver | 2.0.0
- amount of Gratipay donations per week:
tips | $2/week
Services using the Shields standard
- Badger
- badges2svg
- Code Climate
- Coveralls
- Forkability
- Gemnasium
- GoDoc
- PHPPackages
- Read the Docs
- reposs
- ruby-gem-downloads-badge
- Scrutinizer
- Semaphore
- Travis CI
- Version Badge
- VersionEye
Legal
All assets and code are under the CC0 LICENSE and in the public domain unless specified otherwise.
The assets in logo/
are trademarks of their respective companies and are under
their terms and license.