@@ -309,6 +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
314
313
315
> ** Warning**
314
316
> Language names should be URI-escaped, as specified in [ Percent Encoding] ( https://en.wikipedia.org/wiki/Percent-encoding )
@@ -345,6 +347,26 @@ Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats`
345
347
[](https://github.com/anuraghazra/github-readme-stats)
346
348
```
347
349
350
+ ### Ranking configuration
351
+
352
+ You can use the ` &p= ` and ` &q= ` options to change the method used to rank the languages used. The values must be positive real numbers.
353
+
354
+ The algorithm used is
355
+
356
+ ``` javascript
357
+ ranking_index = (byte_count ^ p) * (repo_count ^ q)
358
+ ```
359
+
360
+ [ Details here.] ( https://github.com/anuraghazra/github-readme-stats/issues/1600#issuecomment-1046056305 )
361
+
362
+ - ` &p=1&q=0 ` - _ (default)_ Orders by byte count
363
+ - ` &p=0.5&q=0.5 ` - _ (recommended)_ Uses both byte and repo count for ranking
364
+ - ` &p=0&q=1 ` - Orders by repo count
365
+
366
+ ``` md
367
+ [](https://github.com/anuraghazra/github-readme-stats)
368
+ ```
369
+
348
370
### Demo
349
371
350
372
[ ![ Readme Card] ( https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats )] ( https://github.com/anuraghazra/github-readme-stats )
0 commit comments