mirror of
https://github.com/anuraghazra/github-readme-stats.git
synced 2025-03-07 15:08:07 +08:00
* Stats card: migrate from show_total_reviews to show option (resolves #2836) * dev * docs: improve documentation --------- Co-authored-by: rickstaa <rick.staa@outlook.com>
This commit is contained in:
parent
6cbb08e218
commit
b70b089b8e
@ -37,7 +37,7 @@ export default async (req, res) => {
|
||||
number_format,
|
||||
border_color,
|
||||
rank_icon,
|
||||
show_total_reviews,
|
||||
show,
|
||||
} = req.query;
|
||||
res.setHeader("Content-Type", "image/svg+xml");
|
||||
|
||||
@ -96,7 +96,7 @@ export default async (req, res) => {
|
||||
locale: locale ? locale.toLowerCase() : null,
|
||||
disable_animations: parseBoolean(disable_animations),
|
||||
rank_icon,
|
||||
show_total_reviews: parseBoolean(show_total_reviews),
|
||||
show: parseArray(show),
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
|
300
readme.md
300
readme.md
@ -73,50 +73,48 @@
|
||||
|
||||
Are you considering supporting the project by donating to me? Please DO NOT!!
|
||||
|
||||
|
||||
<img src="https://cfstatic.give.do/910ede2a-7892-43fe-8c8a-dea45e96d950.webp" alt="Picture of Coromandel Express train tragedy" width="35%">
|
||||
|
||||
India just suffered one of the most devastating train accident and your help will be immensely valuable for the people who were effected by this tragedy.
|
||||
India just suffered one of the most devastating train accident and your help will be immensely valuable for the people who were effected by this tragedy.
|
||||
|
||||
Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of-the-coromandel-express-train-tragedy-in-odisha-donate-now) and make a small donation to help the people in need. A small donation goes a long way. :heart:
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
# Features <!-- omit in toc -->
|
||||
|
||||
- [GitHub Stats Card](#github-stats-card)
|
||||
- [Hiding individual stats](#hiding-individual-stats)
|
||||
- [Showing icons](#showing-icons)
|
||||
- [Themes](#themes)
|
||||
- [Customization](#customization)
|
||||
- [GitHub Extra Pins](#github-extra-pins)
|
||||
- [Usage](#usage)
|
||||
- [Demo](#demo)
|
||||
- [Top Languages Card](#top-languages-card)
|
||||
- [Usage](#usage-1)
|
||||
- [Language stats algorithm](#language-stats-algorithm)
|
||||
- [Exclude individual repositories](#exclude-individual-repositories)
|
||||
- [Hide individual languages](#hide-individual-languages)
|
||||
- [Show more languages](#show-more-languages)
|
||||
- [Compact Language Card Layout](#compact-language-card-layout)
|
||||
- [Donut Chart Language Card Layout](#donut-chart-language-card-layout)
|
||||
- [Donut Vertical Chart Language Card Layout](#donut-vertical-chart-language-card-layout)
|
||||
- [Pie Chart Language Card Layout](#pie-chart-language-card-layout)
|
||||
- [Hide Progress Bars](#hide-progress-bars)
|
||||
- [Demo](#demo-1)
|
||||
- [Wakatime Stats Card](#wakatime-stats-card)
|
||||
- [Demo](#demo-2)
|
||||
- [All Demos](#all-demos)
|
||||
- [Quick Tip (Align The Repo Cards)](#quick-tip-align-the-repo-cards)
|
||||
- [Deploy on your own](#deploy-on-your-own)
|
||||
- [On Vercel](#on-vercel)
|
||||
- [:film\_projector: Check Out Step By Step Video Tutorial By @codeSTACKr](#film_projector-check-out-step-by-step-video-tutorial-by-codestackr)
|
||||
- [On other platforms](#on-other-platforms)
|
||||
- [Disable rate limit protections](#disable-rate-limit-protections)
|
||||
- [Keep your fork up to date](#keep-your-fork-up-to-date)
|
||||
- [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project)
|
||||
* [GitHub Stats Card](#github-stats-card)
|
||||
* [Hiding individual stats](#hiding-individual-stats)
|
||||
* [Showing additional individual stats](#showing-additional-individual-stats)
|
||||
* [Showing icons](#showing-icons)
|
||||
* [Themes](#themes)
|
||||
* [Customization](#customization)
|
||||
* [GitHub Extra Pins](#github-extra-pins)
|
||||
* [Usage](#usage)
|
||||
* [Demo](#demo)
|
||||
* [Top Languages Card](#top-languages-card)
|
||||
* [Usage](#usage-1)
|
||||
* [Language stats algorithm](#language-stats-algorithm)
|
||||
* [Exclude individual repositories](#exclude-individual-repositories)
|
||||
* [Hide individual languages](#hide-individual-languages)
|
||||
* [Show more languages](#show-more-languages)
|
||||
* [Compact Language Card Layout](#compact-language-card-layout)
|
||||
* [Donut Chart Language Card Layout](#donut-chart-language-card-layout)
|
||||
* [Donut Vertical Chart Language Card Layout](#donut-vertical-chart-language-card-layout)
|
||||
* [Pie Chart Language Card Layout](#pie-chart-language-card-layout)
|
||||
* [Hide Progress Bars](#hide-progress-bars)
|
||||
* [Demo](#demo-1)
|
||||
* [Wakatime Stats Card](#wakatime-stats-card)
|
||||
* [Demo](#demo-2)
|
||||
* [All Demos](#all-demos)
|
||||
* [Quick Tip (Align The Repo Cards)](#quick-tip-align-the-repo-cards)
|
||||
* [Deploy on your own](#deploy-on-your-own)
|
||||
* [On Vercel](#on-vercel)
|
||||
* [:film\_projector: Check Out Step By Step Video Tutorial By @codeSTACKr](#film_projector-check-out-step-by-step-video-tutorial-by-codestackr)
|
||||
* [On other platforms](#on-other-platforms)
|
||||
* [Disable rate limit protections](#disable-rate-limit-protections)
|
||||
* [Keep your fork up to date](#keep-your-fork-up-to-date)
|
||||
* [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project)
|
||||
|
||||
# Important Notice <!-- omit in toc -->
|
||||
|
||||
@ -149,6 +147,16 @@ You can pass a query parameter `&hide=` to hide any specific stats with comma-se
|
||||

|
||||
```
|
||||
|
||||
### Showing additional individual stats
|
||||
|
||||
You can pass a query parameter `&show=` to show any specific additional stats with comma-separated values.
|
||||
|
||||
> Options: `&show=reviews`
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
|
||||
### Showing icons
|
||||
|
||||
To enable icons, you can pass `&show_icons=true` in the query param, like so:
|
||||
@ -177,8 +185,8 @@ You can look at a preview for [all available themes](./themes/README.md) or chec
|
||||
|
||||
#### Responsive Card Theme
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats#responsive-card-theme#gh-dark-mode-only)
|
||||
[](https://github.com/anuraghazra/github-readme-stats#responsive-card-theme#gh-light-mode-only)
|
||||
[](https://github.com/anuraghazra/github-readme-stats#responsive-card-theme#gh-dark-mode-only)
|
||||
[](https://github.com/anuraghazra/github-readme-stats#responsive-card-theme#gh-light-mode-only)
|
||||
|
||||
Since GitHub will re-upload the cards and serve them from their [CDN](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls), we can not infer the browser/GitHub theme on the server side. There are, however, four methods you can use to create dynamics themes on the client side.
|
||||
|
||||
@ -193,11 +201,11 @@ We have included a `transparent` theme that has a transparent background. This t
|
||||
<details>
|
||||
<summary>:eyes: Show example</summary>
|
||||
|
||||

|
||||

|
||||
|
||||
</details>
|
||||
|
||||
##### Add transparent alpha channel to a themes bg_color
|
||||
##### Add transparent alpha channel to a themes bg\_color
|
||||
|
||||
You can use the `bg_color` parameter to make any of [the available themes](./themes/README.md) transparent. This is done by setting the `bg_color` to a color with a transparent alpha channel (i.e. `bg_color=00000000`):
|
||||
|
||||
@ -208,7 +216,7 @@ You can use the `bg_color` parameter to make any of [the available themes](./the
|
||||
<details>
|
||||
<summary>:eyes: Show example</summary>
|
||||
|
||||

|
||||

|
||||
|
||||
</details>
|
||||
|
||||
@ -224,8 +232,8 @@ You can use [GitHub's theme context](https://github.blog/changelog/2021-11-24-sp
|
||||
<details>
|
||||
<summary>:eyes: Show example</summary>
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats#gh-dark-mode-only)
|
||||
[](https://github.com/anuraghazra/github-readme-stats#gh-light-mode-only)
|
||||
[](https://github.com/anuraghazra/github-readme-stats#gh-dark-mode-only)
|
||||
[](https://github.com/anuraghazra/github-readme-stats#gh-light-mode-only)
|
||||
|
||||
</details>
|
||||
|
||||
@ -270,64 +278,64 @@ You can customize the appearance of your `Stats Card` or `Repo Card` however you
|
||||
|
||||
#### Common Options
|
||||
|
||||
- `title_color` - Card's title color _(hex color)_. Default: `2f80ed`.
|
||||
- `text_color` - Body text color _(hex color)_. Default: `434d58`.
|
||||
- `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).
|
||||
- `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`
|
||||
- `theme` - name of the theme, choose from [all available themes](./themes/README.md). Default: `default` theme.
|
||||
- `cache_seconds` - set the cache header manually _(min: 14400, max: 86400)_. Default: `14400 seconds (4 hours)`.
|
||||
- `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`.
|
||||
* `title_color` - Card's title color *(hex color)*. Default: `2f80ed`.
|
||||
* `text_color` - Body text color *(hex color)*. Default: `434d58`.
|
||||
* `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).
|
||||
* `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`
|
||||
* `theme` - name of the theme, choose from [all available themes](./themes/README.md). Default: `default` theme.
|
||||
* `cache_seconds` - set the cache header manually *(min: 14400, max: 86400)*. Default: `14400 seconds (4 hours)`.
|
||||
* `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`.
|
||||
|
||||
> **Warning**
|
||||
> We use caching to decrease the load on our servers (see <https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425>). Our cards have a default cache of 4 hours (14400 seconds). Also, note that the cache is clamped to a minimum of 4 hours and a maximum of 24 hours.
|
||||
|
||||
##### Gradient in bg_color
|
||||
##### Gradient in bg\_color
|
||||
|
||||
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
|
||||
|
||||
#### Stats Card Exclusive Options
|
||||
|
||||
- `hide` - Hides the [specified items](#hiding-individual-stats) from stats _(Comma-separated values)_. Default: `[] (blank array)`.
|
||||
- `hide_title` - _(boolean)_. Default: `false`.
|
||||
- `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`.
|
||||
- `rank_icon` - Shows alternative rank icon (i.e. `github` or `default`). Default: `default`.
|
||||
- `show_icons` - _(boolean)_. Default: `false`.
|
||||
- `include_all_commits` - Count total commits instead of just the current year commits _(boolean)_. Default: `false`.
|
||||
- `line_height` - Sets the line height between text _(number)_. Default: `25`.
|
||||
- `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`.
|
||||
- `text_bold` - Use bold text _(boolean)_. Default: `true`.
|
||||
- `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`.
|
||||
- `ring_color` - Color of the rank circle _(hex color)_. Defaults to the theme ring color if it exists and otherwise the title color.
|
||||
- `number_format` - Switch between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
|
||||
- `show_total_reviews` - Show total PR reviews _(boolean)_. Default: `false`.
|
||||
* `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||
* `hide_title` - *(boolean)*. Default: `false`.
|
||||
* `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`.
|
||||
* `rank_icon` - Shows alternative rank icon (i.e. `github` or `default`). Default: `default`.
|
||||
* `show_icons` - *(boolean)*. Default: `false`.
|
||||
* `include_all_commits` - Count total commits instead of just the current year commits *(boolean)*. Default: `false`.
|
||||
* `line_height` - Sets the line height between text *(number)*. Default: `25`.
|
||||
* `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`.
|
||||
* `text_bold` - Use bold text *(boolean)*. Default: `true`.
|
||||
* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
|
||||
* `ring_color` - Color of the rank circle *(hex color)*. Defaults to the theme ring color if it exists and otherwise the title color.
|
||||
* `number_format` - Switch between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
|
||||
* `show` - Show [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`) *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||
|
||||
> **Note**
|
||||
> 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
|
||||
|
||||
- `show_owner` - Show the repo's owner name _(boolean)_. Default: `false`.
|
||||
* `show_owner` - Show the repo's owner name *(boolean)*. Default: `false`.
|
||||
|
||||
#### Language Card Exclusive Options
|
||||
|
||||
- `hide` - Hide the languages specified from the card _(Comma-separated values)_. Default: `[] (blank array)`.
|
||||
- `hide_title` - _(boolean)_. Default: `false`.
|
||||
- `layout` - Switch between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`.
|
||||
- `card_width` - Set the card's width manually _(number)_. Default `300`.
|
||||
- `langs_count` - Show more languages on the card, between 1-20 _(number)_. Default: `5` for `normal` and `donut`, `6` for other layouts.
|
||||
- `exclude_repo` - Exclude specified repositories _(Comma-separated values)_. Default: `[] (blank array)`.
|
||||
- `custom_title` - Sets a custom title for the card _(string)_. Default `Most Used Languages`.
|
||||
- `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`.
|
||||
- `hide_progress` - It uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
|
||||
- `size_weight` - Configures language stats algorithm _(number)_ (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 1.
|
||||
- `count_weight` - Configures language stats algorithm _(number)_ (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 0.
|
||||
* `hide` - Hide the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||
* `hide_title` - *(boolean)*. Default: `false`.
|
||||
* `layout` - Switch between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`.
|
||||
* `card_width` - Set the card's width manually *(number)*. Default `300`.
|
||||
* `langs_count` - Show more languages on the card, between 1-20 *(number)*. Default: `5` for `normal` and `donut`, `6` for other layouts.
|
||||
* `exclude_repo` - Exclude specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||
* `custom_title` - Sets a custom title for the card *(string)*. Default `Most Used Languages`.
|
||||
* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
|
||||
* `hide_progress` - It uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
|
||||
* `size_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 1.
|
||||
* `count_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 0.
|
||||
|
||||
> **Warning**
|
||||
> Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
|
||||
@ -336,16 +344,16 @@ You can provide multiple comma-separated values in the bg_color option to render
|
||||
|
||||
#### Wakatime Card Exclusive Options
|
||||
|
||||
- `hide` - Hide the languages specified from the card _(Comma-separated values)_. Default: `[] (blank array)`.
|
||||
- `hide_title` - _(boolean)_. Default `false`.
|
||||
- `line_height` - Sets the line height between text _(number)_. Default `25`.
|
||||
- `hide_progress` - Hides the progress bar and percentage _(boolean)_. Default `false`.
|
||||
- `custom_title` - Sets a custom title for the card _(string)_. Default `Wakatime Stats`.
|
||||
- `layout` - Switch between two available layouts `default` & `compact`. Default `default`.
|
||||
- `langs_count` - Limit the number of languages on the card, defaults to all reported languages _(number)_.
|
||||
- `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) _(string)_. Default `Waka API`.
|
||||
* `hide` - Hide the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||
* `hide_title` - *(boolean)*. Default `false`.
|
||||
* `line_height` - Sets the line height between text *(number)*. Default `25`.
|
||||
* `hide_progress` - Hides the progress bar and percentage *(boolean)*. Default `false`.
|
||||
* `custom_title` - Sets a custom title for the card *(string)*. Default `Wakatime Stats`.
|
||||
* `layout` - Switch between two available layouts `default` & `compact`. Default `default`.
|
||||
* `langs_count` - Limit the number of languages on the card, defaults to all reported languages *(number)*.
|
||||
* `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) *(string)*. Default `Waka API`.
|
||||
|
||||
* * *
|
||||
***
|
||||
|
||||
# GitHub Extra Pins
|
||||
|
||||
@ -365,11 +373,11 @@ Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats`
|
||||
|
||||
### Demo
|
||||
|
||||

|
||||

|
||||
|
||||
Use [show_owner](#customization) variable to include the repo's owner username
|
||||
Use [show\_owner](#customization) variable to include the repo's owner username
|
||||
|
||||

|
||||

|
||||
|
||||
# Top Languages Card
|
||||
|
||||
@ -404,9 +412,9 @@ ranking_index = (byte_count ^ size_weight) * (repo_count ^ count_weight)
|
||||
|
||||
By default, only the byte count is used for determining the languages percentages shown on the language card (i.e. `size_weight=1` and `count_weight=0`). You can, however, use the `&size_weight=` and `&count_weight=` options to weight the language usage calculation. The values must be positive real numbers. [More details about the algorithm can be found here](https://github.com/anuraghazra/github-readme-stats/issues/1600#issuecomment-1046056305).
|
||||
|
||||
- `&size_weight=1&count_weight=0` - _(default)_ Orders by byte count.
|
||||
- `&size_weight=0.5&count_weight=0.5` - _(recommended)_ Uses both byte and repo count for ranking
|
||||
- `&size_weight=0&count_weight=1` - Orders by repo count
|
||||
* `&size_weight=1&count_weight=0` - *(default)* Orders by byte count.
|
||||
* `&size_weight=0.5&count_weight=0.5` - *(recommended)* Uses both byte and repo count for ranking
|
||||
* `&size_weight=0&count_weight=1` - Orders by repo count
|
||||
|
||||
```md
|
||||

|
||||
@ -480,25 +488,25 @@ You can use the `&hide_progress=true` option to hide the percentages and the pro
|
||||
|
||||

|
||||
|
||||
- Compact layout
|
||||
* Compact layout
|
||||
|
||||

|
||||

|
||||
|
||||
- Donut Chart layout
|
||||
* Donut Chart layout
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
|
||||
- Donut Vertical Chart layout
|
||||
* Donut Vertical Chart layout
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
|
||||
- Pie Chart layout
|
||||
* Pie Chart layout
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
[](https://github.com/anuraghazra/github-readme-stats)
|
||||
|
||||
- Hidden progress bars
|
||||
* Hidden progress bars
|
||||
|
||||

|
||||

|
||||
|
||||
# Wakatime Stats Card
|
||||
|
||||
@ -515,71 +523,75 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
- Compact layout
|
||||
* Compact layout
|
||||
|
||||

|
||||

|
||||
|
||||
* * *
|
||||
***
|
||||
|
||||
# All Demos
|
||||
|
||||
- Default
|
||||
* Default
|
||||
|
||||

|
||||
|
||||
- Hiding specific stats
|
||||
* Hiding specific stats
|
||||
|
||||

|
||||

|
||||
|
||||
- Showing icons
|
||||
* Showing addition stats
|
||||
|
||||

|
||||

|
||||
|
||||
- Shows Github logo instead rank level
|
||||
* Showing icons
|
||||
|
||||

|
||||

|
||||
|
||||
- Customize Border Color
|
||||
* Shows Github logo instead rank level
|
||||
|
||||

|
||||

|
||||
|
||||
- Include All Commits
|
||||
* Customize Border Color
|
||||
|
||||

|
||||

|
||||
|
||||
- Themes
|
||||
* Include All Commits
|
||||
|
||||

|
||||
|
||||
* Themes
|
||||
|
||||
Choose from any of the [default themes](#themes)
|
||||
|
||||

|
||||

|
||||
|
||||
- Gradient
|
||||
* Gradient
|
||||
|
||||

|
||||

|
||||
|
||||
- Customizing stats card
|
||||
* Customizing stats card
|
||||
|
||||

|
||||

|
||||
|
||||
- Setting card locale
|
||||
* Setting card locale
|
||||
|
||||

|
||||

|
||||
|
||||
- Customizing repo card
|
||||
* Customizing repo card
|
||||
|
||||

|
||||

|
||||
|
||||
- Top languages
|
||||
* Top languages
|
||||
|
||||

|
||||
|
||||
- WakaTime card
|
||||
* WakaTime card
|
||||
|
||||

|
||||
|
||||
* * *
|
||||
***
|
||||
|
||||
## Quick Tip (Align The Repo Cards)
|
||||
|
||||
@ -598,7 +610,7 @@ By default, GitHub does not lay out the cards side by side. To do that, you can
|
||||
|
||||
## On Vercel
|
||||
|
||||
### :film_projector: [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107)
|
||||
### :film\_projector: [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107)
|
||||
|
||||
Since the GitHub API only allows 5k requests per hour, my `https://github-readme-stats.vercel.app/api` could possibly hit the rate limiter. If you host it on your own Vercel server, then you do not have to worry about anything. Click on the deploy button to get started!
|
||||
|
||||
@ -653,7 +665,7 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme
|
||||
|
||||
Github Readme Stats contains several Vercel environment variables that can be used to remove the rate limit protections:
|
||||
|
||||
- `CACHE_SECONDS`: This environment variable takes precedence over our cache minimum and maximum values and can circumvent these values for self Hosted Vercel instances.
|
||||
* `CACHE_SECONDS`: This environment variable takes precedence over our cache minimum and maximum values and can circumvent these values for self Hosted Vercel instances.
|
||||
|
||||
See [the Vercel documentation](https://vercel.com/docs/concepts/projects/environment-variables) on adding these environment variables to your Vercel instance.
|
||||
|
||||
@ -661,23 +673,23 @@ See [the Vercel documentation](https://vercel.com/docs/concepts/projects/environ
|
||||
|
||||
You can keep your fork, and thus your private Vercel instance up to date with the upstream using GitHub's [Sync Fork button](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork). You can also use the [pull](https://github.com/wei/pull) package created by [@wei](https://github.com/wei) to automate this process.
|
||||
|
||||
# :sparkling_heart: Support the project
|
||||
# :sparkling\_heart: Support the project
|
||||
|
||||
I open-source almost everything I can and try to reply to everyone needing help using these projects. Obviously,
|
||||
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:
|
||||
|
||||
- Giving proper credit when you use github-readme-stats on your readme, linking back to it :D
|
||||
- Starring and sharing the project :rocket:
|
||||
- [](https://www.paypal.me/anuraghazra) - You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
|
||||
* Giving proper credit when you use github-readme-stats on your readme, linking back to it :D
|
||||
* Starring and sharing the project :rocket:
|
||||
* [](https://www.paypal.me/anuraghazra) - You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
|
||||
|
||||
Thanks! :heart:
|
||||
|
||||
* * *
|
||||
***
|
||||
|
||||
[](https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss)
|
||||
[](https://vercel.com?utm_source=github_readme_stats_team\&utm_campaign=oss)
|
||||
|
||||
Contributions are welcome! <3
|
||||
Contributions are welcome! <3
|
||||
|
||||
Made with :heart: and JavaScript.
|
||||
|
@ -112,7 +112,7 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
||||
locale,
|
||||
disable_animations = false,
|
||||
rank_icon = "default",
|
||||
show_total_reviews = false,
|
||||
show = [],
|
||||
} = options;
|
||||
|
||||
const lheight = parseInt(String(line_height), 10);
|
||||
@ -161,7 +161,7 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
||||
id: "prs",
|
||||
};
|
||||
|
||||
if (show_total_reviews) {
|
||||
if (show.includes("reviews")) {
|
||||
STATS.reviews = {
|
||||
icon: icons.reviews,
|
||||
label: i18n.t("statcard.reviews"),
|
||||
|
2
src/cards/types.d.ts
vendored
2
src/cards/types.d.ts
vendored
@ -27,7 +27,7 @@ export type StatCardOptions = CommonOptions & {
|
||||
ring_color: string;
|
||||
text_bold: boolean;
|
||||
rank_icon: RankIcon;
|
||||
show_total_reviews: boolean;
|
||||
show: string[];
|
||||
};
|
||||
|
||||
export type RepoCardOptions = CommonOptions & {
|
||||
|
@ -77,7 +77,7 @@ describe("Test renderStatsCard", () => {
|
||||
|
||||
it("should show total reviews", () => {
|
||||
document.body.innerHTML = renderStatsCard(stats, {
|
||||
show_total_reviews: true,
|
||||
show: ["reviews"],
|
||||
});
|
||||
|
||||
expect(
|
||||
|
Loading…
Reference in New Issue
Block a user