- Notifications
You must be signed in to change notification settings - Fork0
🔥 Stay motivated and show off your contribution streak! 🌟 Display your total contributions, current streak, and longest streak on your GitHub profile README
License
kirito666coder/github-readme-streak-stats
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Display your total contributions, current streak,
and longest streak on your GitHub profile README
- Copy-paste the markdown below into your GitHub profile README
- Replace the value after
?user=
with your GitHub username
[](https://git.io/streak-stats)
- Star the repo 😄
Check out theDemo Site orOptions below for available customizations.
It is recommended to self-host the project more better reliability. SeeDeploying it on your own for more details.
Here you can customize your Streak Stats card with a live preview.
https://streak-stats.demolab.com
Theuser
field is the only required option. All other fields are optional.
If thetheme
parameter is specified, any color customizations specified will be applied on top of the theme, overriding the theme's values.
Parameter | Details | Example |
---|---|---|
user | GitHub username to show stats for | DenverCoder1 |
theme | The theme to apply (Default:default ) | dark ,radical , etc.🎨➜ |
hide_border | Make the border transparent (Default:false ) | true orfalse |
border_radius | Set the roundness of the edges (Default:4.5 ) | Number0 (sharp corners) to248 (ellipse) |
background | Background color (eg.f2f2f2 ,35,d22,00f ) | hex code without# ,css color, or gradient in the formangle,start_color,...,end_color |
border | Border color | hex code without# orcss color |
stroke | Stroke line color between sections | hex code without# orcss color |
ring | Color of the ring around the current streak | hex code without# orcss color |
fire | Color of the fire in the ring | hex code without# orcss color |
currStreakNum | Current streak number | hex code without# orcss color |
sideNums | Total and longest streak numbers | hex code without# orcss color |
currStreakLabel | Current streak label | hex code without# orcss color |
sideLabels | Total and longest streak labels | hex code without# orcss color |
dates | Date range text color | hex code without# orcss color |
excludeDaysLabel | Excluded days of the week text color | hex code without# orcss color |
date_format | Date format pattern or empty for locale format | See note below on📅 Date Formats |
locale | Locale for labels and numbers (Default:en ) | ISO 639-1 code - See🗪 Locales |
short_numbers | Use short numbers (e.g. 1.5k instead of 1,500) | true orfalse |
type | Output format (Default:svg ) | Current options:svg ,png orjson |
mode | Streak mode (Default:daily ) | daily (contribute daily) orweekly (contribute once per Sun-Sat week) |
exclude_days | List of days of the week to exclude from streaks | Comma-separated list of day abbreviations (Sun, Mon, Tue, Wed, Thu, Fri, Sat) e.g.Sun,Sat |
disable_animations | Disable SVG animations (Default:false ) | true orfalse |
card_width | Width of the card in pixels (Default:495 ) | Positive integer, minimum width is 100px per column |
card_height | Height of the card in pixels (Default:195 ) | Positive integer, minimum height is 170px |
hide_total_contributions | Hide the total contributions (Default:false ) | true orfalse |
hide_current_streak | Hide the current streak (Default:false ) | true orfalse |
hide_longest_streak | Hide the longest streak (Default:false ) | true orfalse |
starting_year | Starting year of contributions | Integer, must be2005 or later, eg.2017 . By default, your account creation year is used. |
To enable a theme, append&theme=
followed by the theme name to the end of the source URL:
[](https://git.io/streak-stats)
Theme | Preview |
---|---|
default | |
dark | |
highcontrast | |
More themes! | 🎨See a list of all available themes |
If you have come up with a new theme you'd like to share with others, please seeIssue #32 for more information on how to contribute.
The following are the locales that have labels translated in Streak Stats. Thelocale
query parameter accepts any ISO language or locale code, seehere for a list of valid locales. The locale provided will be used for the date format and number format even if translations are not yet available.
en - English | am - አማርኛ | ar - العربية | bho - भोजपुरी | bn - বাংলা |
ca - català | ceb - Cebuano | da - dansk | de - Deutsch | el - Ελληνικά |
es - español | fa - فارسی | fil - Filipino | fr - français | gu - ગુજરાતી |
he - עברית | hi - हिन्दी | hu - magyar | id - Indonesia | it - italiano |
ja - 日本語 | jv - Jawa | kn - ಕನ್ನಡ | ko - 한국어 | mr - मराठी |
ms - Melayu | ms_ID - Melayu (Indonesia) | my - မြန်မာ | ne - नेपाली | nl - Nederlands |
no - norsk | pl - polski | ps - پښتو | pt - português | pt_BR - português (Brasil) |
ru - русский | sa - संस्कृत भाषा | sd_PK - سنڌي (پاڪستان) | sr - српски | su - Basa Sunda |
sw - Kiswahili | th - ไทย | tr - Türkçe | uk - українська | ur_PK - اردو (پاکستان) |
vi - Tiếng Việt | yo - Èdè Yorùbá | zh_Hans - 中文(简体) | zh_Hant - 中文(繁體) | bg - български |
ht - créole haïtien | hy - հայերեն | rw - Kinyarwanda | sv - svenska | ta - தமிழ் |
If you would like to help translate the Streak Stats cards, please seeIssue #236 for more information.
Ifdate_format
is not provided or is empty, the PHP Intl library is used to determine the date format based on the locale specified in thelocale
query parameter.
A custom date format can be specified by passing a string to thedate_format
parameter.
The required format is to use format string characters fromPHP's date function with brackets around the part representing the year.
When the contribution year is equal to the current year, the characters in brackets will be omitted.
Examples:
Date Format | Result |
---|---|
d F[, Y] | "2020-04-14" => "14 April, 2020" |
j/n/Y | "2020-04-14" => "14/4/2020" |
[Y.]n.j | "2020-04-14" => "2020.4.14" |
M j[, Y] | "2020-04-14" => "Apr 14, 2020" |
[](https://git.io/streak-stats)
This tool uses the contribution graphs on your GitHub profile to calculate which days you have contributed.
To include contributions in private repositories, turn on the setting for "Private contributions" from the dropdown menu above the contribution graph on your profile page.
Contributions include commits, pull requests, and issues that you create in standalone repositories.
The longest streak is the highest number of consecutive days on which you have made at least one contribution.
The current streak is the number of consecutive days ending with the current day on which you have made at least one contribution. If you have made a contribution today, it will be counted towards the current streak, however, if you have not made a contribution today, the streak will only count days before today so that your streak will not be zero.
Note
You may need to wait up to 24 hours for new contributions to show up (Learn how contributions are counted)
It is preferable to host the files on your own server and it takes less than 2 minutes to set up.
Doing this can lead to better uptime and more control over customization (you can modify the code for your usage).
You can deploy the PHP files on any website server with PHP installed including Heroku and Vercel.
The Inkscape dependency is required for PNG rendering, as well as Segoe UI font for the intended rendering. If using Heroku, the buildpacks will install these for you automatically.
Vercel is the recommended option for hosting the files since it isfree and easy to set up. Watch the video below or expand the instructions to learn how to deploy to Vercel.
Note
PNG mode is not supported since Inkscape will not be installed but the default SVG mode will work.
Instructions for deploying to Vercel (Free)
- Click the Deploy button below
- Create your repository by filling in a Repository Name and clicking "Create"
- Visitthis link to create a new Personal Access Token (no scopes required)
- Scroll to the bottom and click"Generate token"
- Add the token as a Config Var with the key
TOKEN
:
- Click"Deploy" at the end of the form
- Once the app is deployed, click the screenshot of your app or continue to the dashboard to find your domain to use in place of
streak-stats.demolab.com
⚠️ NoteIf you receive an error related to libssl or Node 20.x, you can fix this by opening your Vercel project settings and changing the Node.js version to 18.x.
- Sign in toVercel or create a new account athttps://vercel.com
- Use the following command to clone the repository:
git clone https://github.com/DenverCoder1/github-readme-streak-stats.git
. If you plan to make changes, you can also fork the repository and clone your fork instead. If you do not have Git installed, you can download it fromhttps://git-scm.com/downloads. - Navigate to the cloned repository's directory using the command
cd github-readme-streak-stats
- Switch to the "vercel" branch using the command
git checkout vercel
- Make sure you have the Vercel CLI (Command Line Interface) installed on your system. If not, you can download it fromhttps://vercel.com/download.
- Run the command
vercel
and follow the prompts to link your Vercel account and choose a project name - After successful deployment, your app will be available at
<project-name>.vercel.app
- Openthis link to create a new Personal Access Token on GitHub. You don't need to select any scopes for the token.
- Scroll to the bottom of the page and click on"Generate token"
- Visit the Vercel dashboard athttps://vercel.com/dashboard and select your project. Then, click on"Settings" and choose"Environment Variables".
- Add a new environment variable with the key
TOKEN
and the value as the token you generated in step 9, then save your changes - To apply the new environment variable, you need to redeploy the app. Run
vercel --prod
to deploy the app to production.
⚠️ Note
To set up automatic Vercel deployments from GitHub, make sure to turnoff "Include source files outside of the Root Directory" in the General settings and usevercel
as the production branch in the Git settings.
⚠️ Note
If you receive an error related to libssl or Node 20.x, you can fix this by opening your Vercel project settings and changing the Node.js version to 18.x.
Heroku is another great option for hosting the files. All features are supported on Heroku and it is where the default domain is hosted. Heroku is not free, however, and you will need to pay between $5 and $7 per month to keep the app running. Expand the instructions below to learn how to deploy to Heroku.
Instructions for deploying to Heroku (Paid)
- Sign in toHeroku or create a new account athttps://heroku.com
- Visitthis link to create a new Personal Access Token (no scopes required)
- Scroll to the bottom and click"Generate token"
- Click the Deploy button below
- Add the token as a Config Var with the key
TOKEN
:
- Click"Deploy App" at the end of the form
- Once the app is deployed, you can use
<your-app-name>.herokuapp.com
in place ofstreak-stats.demolab.com
You can transfer the files to any webserver using FTP or other means, then refer toCONTRIBUTING.md for installation steps.
Contributions are welcome! Feel free toopen an issue or submit apull request if you have a way to improve this project.
Make sure your request is meaningful and you have tested the app locally before submitting a pull request.
Refer toCONTRIBUTING.md for more details on contributing, installing requirements, and running the application.
💙 If you like this project, give it a ⭐ and share it with friends!
Made with ❤️ and PHP
About
🔥 Stay motivated and show off your contribution streak! 🌟 Display your total contributions, current streak, and longest streak on your GitHub profile README
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- PHP86.4%
- JavaScript10.1%
- CSS3.3%
- Other0.2%