Skip to content

Generate an SVG of Github contributions data for Jekyll

License

Notifications You must be signed in to change notification settings

kinduff/jekyll-github-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jekyll Github Chart

Gem Version Gem Downloads MIT Licensed

This Jekyll plugin provides a tag that takes a Github user and returns either an image or a raw SVG of the contribution graph.

Installation

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

Usage

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 %}

Example

Here's an example using the default parameters.

Jekyll Github Chart example

Special thanks

Thanks to @akerl for creating the githubchart gem which is the foundation of this plugin.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kinduff/jekyll-github-chart.

License

The gem is available as open source under the terms of the MIT License.

About

Generate an SVG of Github contributions data for Jekyll

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages