Compare commits

...
Author SHA1 Message Date
rickstaa 450d095fe4 feat: increase langs_count to 100 2022-10-03 11:49:14 +02:00
Ayushi Vishwakarmaandrickstaa 9e1fc0b7da update default values in readme (#2094)
* update default values in readme

* docs: improve formatting

* docs: improve readme punctation

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-10-03 09:14:37 +02:00
Manan1612 aa084f31c4 Added Contributors Badge (#2096) 2022-10-03 08:42:32 +02:00
rickstaa c5bea57638 docs: fix india care logo 2022-10-02 18:07:43 +02:00
rickstaa c2c984a872 docs: format readme 2022-10-02 17:58:34 +02:00
ianbromwichuos 2faf9c54ff docs: fix link to go India logo svg (#2085) 2022-10-02 17:47:14 +02:00
3 changed files with 101 additions and 102 deletions
+98 -99
View File
@@ -6,6 +6,9 @@
<p align="center"> <p align="center">
<a href="https://github.com/anuraghazra/github-readme-stats/actions"> <a href="https://github.com/anuraghazra/github-readme-stats/actions">
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" /> <img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
</a>
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
</a> </a>
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats"> <a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" /> <img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
@@ -61,10 +64,9 @@
</p> </p>
<p align="center">Love the project? Please consider <a href="https://www.paypal.me/anuraghazra">donating</a> to help it improve! <p align="center">Love the project? Please consider <a href="https://www.paypal.me/anuraghazra">donating</a> to help it improve!
<p> <p>
<a href="https://indiafightscorona.giveindia.org"> <a href="https://indiafightscorona.giveindia.org">
<img src="https://d2wvdrxmr8p0wf.cloudfront.net/static/giveindia.svg" alt="Give india logo" width="200" /> <img src="https://indiaspora.org/wp-content/uploads/2021/04/give-India-logo.png" alt="Give india logo" width="200" />
</a> </a>
Are you considering supporting the project by donating? Please DON'T!! Are you considering supporting the project by donating? Please DON'T!!
@@ -72,25 +74,25 @@ Are you considering supporting the project by donating? Please DON'T!!
Instead, Help India fight the 2nd deadly wave of COVID-19. Instead, Help India fight the 2nd deadly wave of COVID-19.
Thousands of people are dying in India because of a lack of Oxygen & also COVID-related infrastructure. Thousands of people are dying in India because of a lack of Oxygen & also COVID-related infrastructure.
Visit [https://indiafightscorona.giveindia.org](https://indiafightscorona.giveindia.org) and make a small donation to help us fight COVID and overcome this crisis. Visit <https://indiafightscorona.giveindia.org> and make a small donation to help us fight COVID and overcome this crisis.
A small donation goes a long way. :heart: A small donation goes a long way. :heart:
</p>
</p>
# Features # Features
- [GitHub Stats Card](#github-stats-card) - [GitHub Stats Card](#github-stats-card)
- [GitHub Extra Pins](#github-extra-pins) - [GitHub Extra Pins](#github-extra-pins)
- [Top Languages Card](#top-languages-card) - [Top Languages Card](#top-languages-card)
- [Wakatime Week Stats](#wakatime-week-stats) - [Wakatime Week Stats](#wakatime-week-stats)
- [Themes](#themes) - [Themes](#themes)
- [Customization](#customization) - [Customization](#customization)
- [Common Options](#common-options) - [Common Options](#common-options)
- [Stats Card Exclusive Options](#stats-card-exclusive-options) - [Stats Card Exclusive Options](#stats-card-exclusive-options)
- [Repo Card Exclusive Options](#repo-card-exclusive-options) - [Repo Card Exclusive Options](#repo-card-exclusive-options)
- [Language Card Exclusive Options](#language-card-exclusive-options) - [Language Card Exclusive Options](#language-card-exclusive-options)
- [Wakatime Card Exclusive Option](#wakatime-card-exclusive-options) - [Wakatime Card Exclusive Option](#wakatime-card-exclusive-options)
- [Deploy Yourself](#deploy-on-your-own-vercel-instance) - [Deploy Yourself](#deploy-on-your-own-vercel-instance)
# GitHub Stats Card # GitHub Stats Card
@@ -160,16 +162,16 @@ You can customize the appearance of your `Stats Card` or `Repo Card` however you
#### Common Options: #### Common Options:
- `title_color` - Card's title color _(hex color)_. Default: `2f80ed`. - `title_color` - Card's title color _(hex color)_. Default: `2f80ed`.
- `text_color` - Body text color _(hex color)_. Default: `434d58`. - `text_color` - Body text color _(hex color)_. Default: `434d58`.
- `icon_color` - Icons color if available _(hex color)_. Default: `4c71f2`. - `icon_color` - Icons color if available _(hex color)_. Default: `4c71f2`.
- `border_color` - Card's border color _(hex color)_. Default: `e4e2e2` (Does not apply when `hide_border` is enabled). - `border_color` - Card's border color _(hex color)_. Default: `e4e2e2` (Does not apply when `hide_border` is enabled).
- `bg_color` - Card's background color _(hex color)_ **or** a gradient in the form of _angle,start,end_. Default: `fffefe` - `bg_color` - Card's background color _(hex color)_ **or** a gradient in the form of _angle,start,end_. Default: `fffefe`
- `hide_border` - Hides the card's border _(boolean)_. Default: `false` - `hide_border` - Hides the card's border _(boolean)_. Default: `false`
- `theme` - name of the theme, choose from [all available themes](./themes/README.md). Default: `default` theme. - `theme` - name of the theme, choose from [all available themes](./themes/README.md). Default: `default` theme.
- `cache_seconds` - set the cache header manually _(min: 7200, max: 86400)_. Default: `14400 seconds (4 hours)`. - `cache_seconds` - set the cache header manually _(min: 7200, max: 86400)_. Default: `14400 seconds (4 hours)`.
- `locale` - set the language in the card _(e.g. cn, de, es, etc.)_. Default: `en`. - `locale` - set the language in the card _(e.g. cn, de, es, etc.)_. Default: `en`.
- `border_radius` - Corner rounding on the card. Default: `4.5`. - `border_radius` - Corner rounding on the card. Default: `4.5`.
> Note: The minimum of cache_seconds is currently 4 hours as a temporary fix for PATs exhaustion. > Note: The minimum of cache_seconds is currently 4 hours as a temporary fix for PATs exhaustion.
@@ -177,43 +179,41 @@ You can customize the appearance of your `Stats Card` or `Repo Card` however you
You can provide multiple comma-separated values in the bg_color option to render a gradient, with the following format: You can provide multiple comma-separated values in the bg_color option to render a gradient, with the following format:
``` &bg_color=DEG,COLOR1,COLOR2,COLOR3...COLOR10
&bg_color=DEG,COLOR1,COLOR2,COLOR3...COLOR10
```
> Note on cache: Repo cards have a default cache of 4 hours (14400 seconds) if the fork count & star count is less than 1k, otherwise, it's 2 hours (7200 seconds). Also, note that the cache is clamped to a minimum of 2 hours and a maximum of 24 hours. > Note on cache: Repo cards have a default cache of 4 hours (14400 seconds) if the fork count & star count is less than 1k, otherwise, it's 2 hours (7200 seconds). Also, note that the cache is clamped to a minimum of 2 hours and a maximum of 24 hours.
#### Stats Card Exclusive Options: #### Stats Card Exclusive Options:
- `hide` - Hides the [specified items](#hiding-individual-stats) from stats _(Comma-separated values)_. Default: `[] (blank array)`. - `hide` - Hides the [specified items](#hiding-individual-stats) from stats _(Comma-separated values)_. Default: `[] (blank array)`.
- `hide_title` - _(boolean)_. Default: `false`. - `hide_title` - _(boolean)_. Default: `false`.
- `card_width` - Set the card's width manually _(number)_. Default: `500px (approx.)`. - `card_width` - Set the card's width manually _(number)_. Default: `500px (approx.)`.
- `hide_rank` - _(boolean)_ hides the rank and automatically resizes the card width. Default: `false`. - `hide_rank` - _(boolean)_ hides the rank and automatically resizes the card width. Default: `false`.
- `show_icons` - _(boolean)_. Default: `false`. - `show_icons` - _(boolean)_. Default: `false`.
- `include_all_commits` - Count total commits instead of just the current year commits _(boolean)_. Default: `false`. - `include_all_commits` - Count total commits instead of just the current year commits _(boolean)_. Default: `false`.
- `count_private` - Count private commits _(boolean)_. Default: `false`. - `count_private` - Count private commits _(boolean)_. Default: `false`.
- `line_height` - Sets the line-height between text _(number)_. Default: `25`. - `line_height` - Sets the line-height between text _(number)_. Default: `25`.
- `exclude_repo` - Exclude stars from specified repositories _(Comma-separated values)_. Default: `[] (blank array)`. - `exclude_repo` - Exclude stars from specified repositories _(Comma-separated values)_. Default: `[] (blank array)`.
- `custom_title` - Sets a custom title for the card. Default: `<username> Github Stats`. - `custom_title` - Sets a custom title for the card. Default: `<username> Github Stats`.
- `text_bold` - Use bold text _(boolean)_. Default: `true`. - `text_bold` - Use bold text _(boolean)_. Default: `true`.
- `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`. - `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`.
> Note on `hide_rank`: > Note on `hide_rank`:
When hide_rank=`true`, the minimum card width is 270 px + the title length and padding. > When hide_rank=`true`, the minimum card width is 270 px + the title length and padding.
#### Repo Card Exclusive Options: #### Repo Card Exclusive Options:
- `show_owner` - Show the repo's owner name _(boolean)_ - `show_owner` - Show the repo's owner name _(boolean)_. Defaults to `false`.
#### Language Card Exclusive Options: #### Language Card Exclusive Options:
- `hide` - Hide the languages specified from the card _(Comma-separated values)_ - `hide` - Hide the languages specified from the card _(Comma-separated values)_
- `hide_title` - _(boolean)_ - `hide_title` - _(boolean)_. Defaults to `false`.
- `layout` - Switch between two available layouts `default` & `compact` - `layout` - Switch between two available layouts `default` & `compact`
- `card_width` - Set the card's width manually _(number)_ - `card_width` - Set the card's width manually _(number)_
- `langs_count` - Show more languages on the card, between 1-10, defaults to 5 _(number)_ - `langs_count` - Show more languages on the card, between 1-10, defaults to 5 _(number)_
- `exclude_repo` - Exclude specified repositories _(Comma-separated values)_ - `exclude_repo` - Exclude specified repositories _(Comma-separated values)_
- `custom_title` - Sets a custom title for the card - `custom_title` - Sets a custom title for the card
> :warning: **Important:** > :warning: **Important:**
> Language names should be uri-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding) > Language names should be uri-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
@@ -222,17 +222,17 @@ When hide_rank=`true`, the minimum card width is 270 px + the title length and p
#### Wakatime Card Exclusive Options: #### Wakatime Card Exclusive Options:
- `hide` - Hide the languages specified from the card _(Comma-separated values)_ - `hide` - Hide the languages specified from the card _(Comma-separated values)_
- `hide_title` - _(boolean)_ - `hide_title` - _(boolean)_. Defaults to `false`.
- `line_height` - Sets the line-height between text _(number)_ - `line_height` - Sets the line-height between text _(number)_. Default Value: `25`.
- `hide_progress` - Hides the progress bar and percentage _(boolean)_ - `hide_progress` - Hides the progress bar and percentage _(boolean)_
- `custom_title` - Sets a custom title for the card - `custom_title` - Sets a custom title for the card
- `layout` - Switch between two available layouts `default` & `compact` - `layout` - Switch between two available layouts `default` & `compact`
- `langs_count` - Limit the number of languages on the card, defaults to all reported languages - `langs_count` - Limit the number of languages on the card, defaults to all reported languages
- `api_domain` - Set a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) - `api_domain` - Set a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi)
- `range` Request a range different from your WakaTime default, e.g. `last_7_days`. See [WakaTime API docs](https://wakatime.com/developers#stats) for a list of available options. - `range` Request a range different from your WakaTime default, e.g. `last_7_days`. See [WakaTime API docs](https://wakatime.com/developers#stats) for a list of available options.
--- * * *
# GitHub Extra Pins # GitHub Extra Pins
@@ -310,7 +310,7 @@ You can use the `&layout=compact` option to change the card design.
[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats)
- Compact layout - Compact layout
[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats)
@@ -330,65 +330,65 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) [![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats)
- Compact layout - Compact layout
[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&layout=compact)](https://github.com/anuraghazra/github-readme-stats) [![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&layout=compact)](https://github.com/anuraghazra/github-readme-stats)
--- * * *
### All Demos ### All Demos
- Default - Default
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra)
- Hiding specific stats - Hiding specific stats
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=contribs,issues) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=contribs,issues)
- Showing icons - Showing icons
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=issues&show_icons=true) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=issues&show_icons=true)
- Customize Border Color - Customize Border Color
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&border_color=2e4058) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&border_color=2e4058)
- Include All Commits - Include All Commits
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&include_all_commits=true) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&include_all_commits=true)
- Themes - Themes
Choose from any of the [default themes](#themes) Choose from any of the [default themes](#themes)
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=radical) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=radical)
- Gradient - Gradient
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&bg_color=30,e96443,904e95&title_color=fff&text_color=fff) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&bg_color=30,e96443,904e95&title_color=fff&text_color=fff)
- Customizing stats card - Customizing stats card
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&show_icons=true&title_color=fff&icon_color=79ff97&text_color=9f9f9f&bg_color=151515) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&show_icons=true&title_color=fff&icon_color=79ff97&text_color=9f9f9f&bg_color=151515)
- Setting card locale - Setting card locale
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&locale=es) ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&locale=es)
- Customizing repo card - Customizing repo card
![Customized Card](https://github-readme-stats.vercel.app/api/pin?username=anuraghazra&repo=github-readme-stats&title_color=fff&icon_color=f9f9f9&text_color=9f9f9f&bg_color=151515) ![Customized Card](https://github-readme-stats.vercel.app/api/pin?username=anuraghazra&repo=github-readme-stats&title_color=fff&icon_color=f9f9f9&text_color=9f9f9f&bg_color=151515)
- Top languages - Top languages
[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats)
- Wakatime card - Wakatime card
[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) [![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats)
--- * * *
### Quick Tip (Align The Repo Cards) ### Quick Tip (Align The Repo Cards)
@@ -416,23 +416,23 @@ NOTE: Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) we
<details> <details>
<summary><b> Guide on setting up Vercel 🔨 </b></summary> <summary><b> Guide on setting up Vercel 🔨 </b></summary>
1. Go to [vercel.com](https://vercel.com/) 1. Go to [vercel.com](https://vercel.com/)
1. Click on `Log in` 2. Click on `Log in`
![](https://files.catbox.moe/tct1wg.png) ![](https://files.catbox.moe/tct1wg.png)
1. Sign in with GitHub by pressing `Continue with GitHub` 3. Sign in with GitHub by pressing `Continue with GitHub`
![](https://files.catbox.moe/btd78j.jpeg) ![](https://files.catbox.moe/btd78j.jpeg)
1. Sign in to GitHub and allow access to all repositories, if prompted 4. Sign in to GitHub and allow access to all repositories, if prompted
1. Fork this repo 5. Fork this repo
1. After forking the repo, open the [`vercel.json`](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json#L5) file and change the `maxDuration` field to `10` 6. After forking the repo, open the [`vercel.json`](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json#L5) file and change the `maxDuration` field to `10`
1. Go back to your [Vercel dashboard](https://vercel.com/dashboard) 7. Go back to your [Vercel dashboard](https://vercel.com/dashboard)
1. Select `Import Project` 8. Select `Import Project`
![](https://files.catbox.moe/qckos0.png) ![](https://files.catbox.moe/qckos0.png)
1. Select `Import Git Repository`. Select root and keep everything as is. 9. Select `Import Git Repository`. Select root and keep everything as is.
![](https://files.catbox.moe/pqub9q.png) ![](https://files.catbox.moe/pqub9q.png)
1. Create a personal access token (PAT) [here](https://github.com/settings/tokens/new) and enable the `repo` permissions (this allows access to see private repo stats) 10. Create a personal access token (PAT) [here](https://github.com/settings/tokens/new) and enable the `repo` permissions (this allows access to see private repo stats)
1. Add the PAT as an environment variable named `PAT_1` (as shown). 11. Add the PAT as an environment variable named `PAT_1` (as shown).
![](https://files.catbox.moe/0ez4g7.png) ![](https://files.catbox.moe/0ez4g7.png)
1. Click deploy, and you're good to go. See your domains to use the API! 12. Click deploy, and you're good to go. See your domains to use the API!
</details> </details>
@@ -443,17 +443,16 @@ this takes time. You can use this service for free.
However, if you are using this project and are happy with it or just want to encourage me to continue creating stuff, there are a few ways you can do it:- However, if you are using this project and are happy with it or just want to encourage me to continue creating stuff, there are a few ways you can do it:-
- Giving proper credit when you use github-readme-stats on your readme, linking back to it :D - Giving proper credit when you use github-readme-stats on your readme, linking back to it :D
- Starring and sharing the project :rocket: - Starring and sharing the project :rocket:
- [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea: - [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
Thanks! :heart: Thanks! :heart:
--- * * *
[![https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss](./powered-by-vercel.svg)](https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss) [![https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss](./powered-by-vercel.svg)](https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss)
Contributions are welcome! &lt;3
Contributions are welcome! <3
Made with :heart: and JavaScript. Made with :heart: and JavaScript.
+1 -1
View File
@@ -88,7 +88,7 @@ const renderRepoCard = (repo, options = {}) => {
icon_color, icon_color,
text_color, text_color,
bg_color, bg_color,
show_owner, show_owner = false,
theme = "default_repocard", theme = "default_repocard",
border_radius, border_radius,
border_color, border_color,
+2 -2
View File
@@ -205,7 +205,7 @@ const calculateNormalLayoutHeight = (totalLangs) => {
const useLanguages = (topLangs, hide, langs_count) => { const useLanguages = (topLangs, hide, langs_count) => {
let langs = Object.values(topLangs); let langs = Object.values(topLangs);
let langsToHide = {}; let langsToHide = {};
let langsCount = clampValue(parseInt(langs_count), 1, 10); let langsCount = clampValue(parseInt(langs_count), 1, 100);
// populate langsToHide map for quick lookup // populate langsToHide map for quick lookup
// while filtering out // while filtering out
@@ -235,7 +235,7 @@ const useLanguages = (topLangs, hide, langs_count) => {
*/ */
const renderTopLanguages = (topLangs, options = {}) => { const renderTopLanguages = (topLangs, options = {}) => {
const { const {
hide_title, hide_title = false,
hide_border, hide_border,
card_width, card_width,
title_color, title_color,