This Jekyll plugin provides a tag that takes a Github user and returns either an image or a raw SVG of the contribution graph.
Add this line to your application's Gemfile:
group :jekyll_plugins do
gem 'jekyll_github_chart'
end
And then execute:
$ bundle install
Or install it yourself as:
$ gem install jekyll_github_chart
Finally, call the plugin in your _config.yml
file.
plugins:
- jekyll-github-chart
You can call the tag with a the defaults like this.
{% github_chart username %}
This will generate an HTML img
tag with an SVG encoded as a data URI. For example:
<img src='data:image/svg+xml;charset=utf-8,...' class='github-contributions' alt='username Github contributions' />
There are 3 color schemes available: default
, old
, and halloween
.
{% github_chart username halloween %}
Finally, if you don't want an img
tag, you can pass a format argument to have a raw SVG output.
{% github_chart username halloween raw %}
Here's an example using the default parameters.
Thanks to @akerl for creating the githubchart gem which is the foundation of this plugin.
Bug reports and pull requests are welcome on GitHub at https://github.com/kinduff/jekyll-github-chart.
The gem is available as open source under the terms of the MIT License.