Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.15 KB

README.md

File metadata and controls

29 lines (18 loc) · 1.15 KB

Github Commits Widget

Want to see the latest commits to a github repo on a web page? Have I got a widget for you!

Click here for a demo

It takes the following parameters:

Required:

  • owner: (string) The owner of the github repo.
  • repo: (string) The name of the repo.

Optional:

  • limit: (integer) How many commits to show, starting with the most recent.
  • width: (integer) The width in pixels of the widget.
  • height: (integer) The height in pixels of the widget.
  • heading: (string) The text to use in the header of the widget.

For example, to view this repository's 6 latest commits, I could load the widget in an iframe on a page like this:

<iframe src="http://nlalonde.github.com/commits-widget/index.html?owner=nlalonde&repo=nlalonde.github.com&limit=6&width=500&height=200" width="502px" height="202px"></iframe>

Easy pickings!

Feel free to fork this code, change it, and host it on your own servers. As shown in the example, I'm hosting it as a Github page at http://nlalonde.github.com/commits-widget/index.html.