You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+29-32Lines changed: 29 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,7 @@ You can use [GitHub's theme context](https://github.blog/changelog/2021-11-24-sp
216
216
##### Use GitHub's new media feature
217
217
218
218
You can use [GitHub's new media feature](https://github.blog/changelog/2022-05-19-specify-theme-context-for-images-in-markdown-beta/) in HTML to specify whether to display images for light or dark themes. This is done using the HTML `<picture>` element in combination with the `prefers-color-scheme` media feature.
219
-
219
+
220
220
```html
221
221
<picture>
222
222
<source
@@ -309,8 +309,8 @@ You can provide multiple comma-separated values in the bg_color option to render
309
309
-`custom_title` - Sets a custom title for the card _(string)_. Default `Most Used Languages`.
310
310
-`disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`.
311
311
-`hide_progress` - It uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
312
-
-`p` - Configures ranking algorithm, defaults to 1, recommended is 0.5 _(number)_
313
-
-`q` - Configures ranking algorithm, defaults to 0, recommended is 0.5 _(number)_
312
+
-`p` - Configures language stats algorithm_(number)_ (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 1.
313
+
-`q` - Configures language stats algorithm_(number)_ (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 0.
314
314
315
315
> **Warning**
316
316
> Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
@@ -382,6 +362,23 @@ The top languages card shows a GitHub user's most frequently used top language.
382
362
> **Note**
383
363
> Top Languages does not indicate my skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub. It is a new feature of github-readme-stats.
384
364
365
+
### Language stats algorithm
366
+
367
+
We use the following algorithm to calculate the languages percentages on the language card:
By default, only the byte count is used for determining the languages percentages shown on the language card (i.e. `p=1` and `q=0`). You can, however, use the `&p=` and `&q=` options to weight the language usage calculation. The values must be positive real numbers. More details about the algorithm can be found [here](Details here.](https://github.com/anuraghazra/github-readme-stats/issues/1600#issuecomment-1046056305)).
373
+
374
+
-`&p=1&q=0` - _(default)_ Orders by byte count.
375
+
-`&p=0.5&q=0.5` - _(recommended)_ Uses both byte and repo count for ranking
0 commit comments