Closed
Description
openedon Feb 8, 2015
Would be nice to be able to add custom badges like:
badges:
custom:
analytics:
text: 'Analytics'
image: 'https://ga-beacon.appspot.com/some-ga-code/some-repo/readme'
url: 'https://github.com/some-org-auth/some-repo'
tooltip: 'hello'
something like the following code put into misc badges to parse these custom badges
custom = (opts) ->
if opts == null
opts = {}
if !opts.badges.custom or !opts.name
return ''
else
results = ''
for key of opts.badges.custom
customInfo = opts.badges.custom[key]
tooltipFmtd = if customInfo.tooltip then ' "' + customInfo.tooltip + '"' else ''
results += '[![' + customInfo.text + '](' + customInfo.image + ')](' + customInfo.url + tooltipFmtd + ')'
results
I'll be happy to pull on this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment