Table of Contents
About The Project
GitHub-Contribution-Graph is an awesome tool for dynamically generating contribution graphs that show your GitHub contributions.
It can be used anywhere, you can download the image, share the link, or paste the link in any markdown file, and it will render the image directly on the website.
Getting Started
Usage
https://github-contribution-graph.ez4o.com/?username=[YOUR_GITHUB_USERNAME]&last_n_days=[DAYS_YOU_WANT_TO_SHOW]&img_url=[ENCODED_IMAGE_URL]
Parameters
| Parameter | Necessity | Description | Default Value |
|---|---|---|---|
username |
Required | Your GitHub username. | None |
last_n_days |
Optional | The n days to show on the chart. 0 < n < 365 | 7 |
img_url |
Optional | Background image. Use url encode tool like https://www.urlencoder.org/. | A Cat Image |
⚠️ If you are using large
last_n_daysor large image file: The response time may be very long!
Example
Assume we want:
-
username =
wst24365888 -
last_n_days =
10 -
img_url =
https://image.cache.storm.mg/media/image/2021/03/05/20210305-031458_U22011_M676060_ca39.gifRemember to encode it:
https%3A%2F%2Fimage.cache.storm.mg%2Fmedia%2Fimage%2F2021%2F03%2F05%2F20210305-031458_U22011_M676060_ca39.gif
Then, we get:
https://github-contribution-graph.ez4o.com/?username=wst24365888&last_n_days=10&img_url=https%3A%2F%2Fimage.cache.storm.mg%2Fmedia%2Fimage%2F2021%2F03%2F05%2F20210305-031458_U22011_M676060_ca39.gif
And yeah! GitHub-Contribution-Graph actually supports gif!
Deploy Your Own Server
These are some instructions on setting up your project locally, just follow these simple steps.
Prerequisites
Installation
-
Clone the repo.
git clone https://github.com/ez4o/github-contribution-graph.git cd github-contribution-graph -
Install npm packages.
-
Install Go modules.
-
Fill in the GitHub token inside the configuration.
cp config.json.example config.json
Generate Dist-SSR
-
Use release command, and it will generate
dist-ssr/with a executable file inside.or
-
Get
dist-ssr/, and you can deploy it anywhere!
When execute, GitHub-Contribution-Graph will use port 8686 and 8687.
Roadmap
- Customize Background Image
- CSS Animation (actually, it's a SMIL animation lol)
- New Parameter:
last_n_days - More Patameters...
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feat/amazing-feature) - Commit your Changes with Conventional Commits
- Push to the Branch (
git push origin feat/amazing-feature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Acknowledgments
Contact
Author
- HSING-HAN, WU (Xyphuz)
- Mail me: xyphuzwu@gmail.com
- About me: https://about.xyphuz.com
- GitHub: https://github.com/wst24365888
