In both circumstances, across two decades, you did this to look cool. Sure, it never works but you do it anyway.
The first entrant and thus market leader of the “Blog Badges for GitHub” micro-industry is the “GitHub Badge” It is beautifully demonstrated in static image form above, or if you click the image through to the website (or here to my blog and its aesthetically appealing enhancement with said GitHub Badge) you’ll see it live and interactive.
Touch it. Feel it. Press the “Show more” link for hours of entertainment.
Then get it for yourself. Read the GitHub Badge website or just…
Slap the following into your blog sidebar:
Only GITHUB_USERNAME is a required pre-set variable. The others above show the defaults, and can be changed by being specified.
For my WordPress sidebar, which uses
<h2> for sections and headers, I use the following:
Thus the badge is inserted in the
<li> element, and the “My projects (drnic)” header is an
<h2> instead of a
Source and tests on github
You can fetch the source from github – http://github.com/drnic/github_badges/tree/master – using:
git clone git://github.com/drnic/github_badges.git
You might want to add an option to turn off the auto-CSS generator so you can theme it yourself.
test/ folder. Either run them with
rake test, or individually open the files in your browser.
Future cool things the badge could do…
Ultimately, when Chris Wanstrath (harass him on twitter) adds more fields and APIs to the GitHub API then the badge can do more. Currently it orders the projects in reverse order – that is, newest projects first. If I can get the network/watching counters then I can order the list using those values, etc.
Any other cool ideas for what the badge could do?
I’d like to be able to show project version numbers (e.g. gem version numbers) and other project meta-information. This would require GitHub to offer a CRUD UI for generic key/values and for the fields to be returned via their API.
If you know Chris and can throw heavy objects at him with moderate certainty of hitting him and not damaging any expensive equipment, please do so til he gives me this stuff.
- Migrating project websites to github pages with sake tasks, new websites with jekyll_generator Its almost Christmas time and that means presents. It...
- How to yell at people with GitHub from TextMate Sometimes when you are perusing code you ask the question:...
- GitHub and TextMate Unite I wanted to go from a source file to the...
- Auto-completer for my blog comments It took 4 hours to return from the town of...
- My railsconf sessions in my sidebar Jesse Newland got the JSON API a day ago and...