DEPRECATED (no longer using Hexo) - Display a GitHub repositoy badge with timeline in your post to keep track of version difference.
CSS JavaScript HTML
Latest commit fd8f715 Jun 4, 2015 @akfish Bump up version to 1.0.1 #1
Permalink
Failed to load latest commit information.
static Add width parameter #1 Jun 4, 2015
.gitignore Implement hexo plugin May 5, 2015
README.md Add width parameter #1 Jun 4, 2015
capture.gif Add README.md May 6, 2015
index.js Add width parameter #1 Jun 4, 2015
package.json Bump up version to 1.0.1 #1 Jun 4, 2015
tag.html Add width parameter #1 Jun 4, 2015

README.md

hexo-github

Display a GitHub repositoy badge with timeline in your post to keep track of version difference.

GitHub Badge Animation

Motive

When referencing an on-going project in an article, some of the content might became un-true or out-of-date as the project evolves, which would certainly cause some confusions to the readers.

This plugin display a badge with timeline for a GitHub repository that will compare latest commit against the referenced one. It should keep the readers informed.

Install

npm install --save hexo-github

Usage

Insert github tag in your article:

{% github user repo referenced_commit [auto_expand = true | false] [width = 100%] %}
Argument Description
user GitHub user name
repo GitHub repository name of that user
commit Commit sha1 referenced in the article
auto_expand (Optional, default == false) true of false. Expand the timeline once synced if set to true.
width (Optional, default == 100%). Widget's width. It should be a valid CSS width value.

Example:

{% github akfish hexo-math b82e65 %}

Known issues & TODO

  • It will not work if referenced commit is not in latest 100 ones
  • Responsive design
  • Mobile layout