Skip to content

marcelmokos/gh-widget

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hi, this is just a little hack to make your self a nice Github Contribution Widget.

place the following code anywhere you want to place this widget

  <div id="github-widget" data-user="your-github-username" data-display="pop_repos,calendar"></div>
  <script src="https://gh-widget.oyanglul.us/index.js"></script>

then BOOM! 🎆 ![](Screen Shot.png)

Config

  • username: put your github username in data-user attribute
  • display: put any of pop_repos calendar in data-display attribute,split by ,

Try

Live Example

How this works

  • Q:Where is the server?
    • A: backend code is just a gist file https://gist.github.com/jcouyang/aec5210828043d5505bd which just simple scrape your github profile page and provide a nice json file. and I've create gist.github.com.ru (ru is for ruby) as a my little service deployed in heroku, which can run ruby code in gist.github.com. it's quite handy than AWS lambda if you don't care anyone can see your source code. So it's the only server ever needed.
  • Q: How can you handle gh-widget.oyanglul.us without a server.
    • A: github custom 404 page which redirect any path to my 404.html, and that html have a script to handle the path as parameter. for example, https://gh-widget.oyanglul.us/jcouyang will actually toes to 404.html

About

Github Contribution Widget

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 46.7%
  • HTML 42.6%
  • JavaScript 10.7%