/jquery-github

A jQuery plugin to display your Github Repositories.

Primary LanguageJavaScript

jQuery Github Build Status

Github Repo Demonstration

Usage

Create an attribute called data-repo:

<div data-repo="jquery-boilerplate/boilerplate"></div>

Include jQuery:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>

Include plugin's CSS and JS:

<link rel="stylesheet" href="assets/base.css">
<script src="jquery.github.min.js"></script>

Call the plugin:

$('[data-repo]').github();

And that's it \o/

Check full example's source code.

Extra

Added functionality to fetch and display all repos for a user, to do so just call the plugin on the container and pass it a github username as part of its options object:

$('.container').github( { username: 'timdouglas' } );

This will create all the divs automatically for you, if you want to give them extra classes, pass the elClass option with the username.

Showcase

Have you used this plugin in your project?

Let me know! Send a tweet or pull request and I'll add it here :)

Forks

Prefer a non-jquery version with pure JavaScript?

No problem, @ricardobeat already did one. Check his fork!

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Also remember to follow jQuery's Code Style.

History

  • v0.2.9 May 1, 2013
    • Fixed urls
  • v0.2.8 April 30, 2013
    • Followed jQuery's core style guide
  • v0.2.7 April 29, 2013
    • Code refactoring
    • Upgraded Grunt from v0.3 to v0.4
  • v0.2.6 March 14, 2013
    • Updated to responsive design
  • v0.2.5 March 01, 2013
    • Added Grunt and integrated it with Travis
    • Added lint task
    • Added minify task
  • v0.2.4 January 17, 2013
    • Renamed from jquery-github-repos to jquery-github
  • v0.2.3 January 17, 2013
    • Added to jQuery Plugins Registry
    • Updated to jQuery v1.9
  • v0.2.2 January 15, 2013
    • Fixed "Last commit" date
    • Cached repo data using sessionStorage
    • Added error message if API exceeds its limits
  • v0.2.1 January 13, 2013
    • Added live demo
    • Replaced single images for a sprite
    • Added minified version
  • v0.2 September 11, 2012
    • Code wrapped into a jQuery plugin
    • Demonstration page created
  • v0.1 September 10, 2012
    • Initial commit

Credits

Built on top of jQuery Boilerplate

License

MIT License