This is a very simple to use widget that perfect for open source projects sites. On open source project site you typically want to show how active is your development is. Namely, how many commits your project have.. how often are they.
Reference 'github.commits.widget-min.js' and containter div and place such script.
<script>
$(function() {
$('#github-commits').githubInfoWidget(
{ user: 'alexanderbeletsky', repo: 'github.commits.widget', branch: 'master' });
});
</script>
where, user is your github account, repo is name of repository and branch is the name of branch you want to track.
It will be rendered to html widget containing information about last commits to repository. See index.html.
You might limit number commits shown in widget by providing with 'last' parameter:
<script>
$(function() {
$('#github-commits').githubInfoWidget(
{ user: 'alexanderbeletsky', repo: 'github.commits.widget', branch: 'master', last: 15 });
});
</script>
You might also limit the length of commit message, by 'limitMessageTo' parameter:
<script>
$(function() {
$('#github-commits').githubInfoWidget(
{ user: 'alexanderbeletsky', repo: 'trackyt.api.csharp', branch: 'master', last: 15, limitMessageTo: 30 });
});
</script>
You can control the avatar size (in pixels) by providing avatarSize option. Default value is 20px.
<script>
$(function() {
$('#github-commits').githubInfoWidget(
{ user: 'alexanderbeletsky', repo: 'trackyt.api.csharp', branch: 'master', last: 15, limitMessageTo: 30, avatarSize: 33 });
});
</script>
For github.commits.widget I've used: