Skip to content

Commit f1d0776

Browse files
qwerty541harryzcy
authored andcommitted
docs: improve query options appereance using tables (anuraghazra#3484)
1 parent 0f0ee68 commit f1d0776

File tree

1 file changed

+61
-49
lines changed

1 file changed

+61
-49
lines changed

readme.md

Lines changed: 61 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -290,16 +290,18 @@ You can customize the appearance of all your cards however you wish with URL par
290290

291291
#### Common Options
292292

293-
- `title_color` - Card's title color *(hex color)*. Default: `2f80ed`.
294-
- `text_color` - Body text color *(hex color)*. Default: `434d58`.
295-
- `icon_color` - Icons color if available *(hex color)*. Default: `4c71f2`.
296-
- `border_color` - Card's border color *(hex color)*. Default: `e4e2e2` (does not apply when `hide_border` is enabled).
297-
- `bg_color` - Card's background color *(hex color)* **or** a gradient in the form of *angle,start,end*. Default: `fffefe`
298-
- `hide_border` - Hides the card's border *(boolean)*. Default: `false`
299-
- `theme` - Name of the theme; choose from [all available themes](themes/README.md). Default: `default` theme.
300-
- `cache_seconds` - Sets the cache header manually *(min: 21600, max: 86400)*. Default: `21600 seconds (6 hours)`.
301-
- `locale` - Sets the language in the card, you can check full list of available locales [here](#available-locales). Default: `en`.
302-
- `border_radius` - Corner rounding on the card. Default: `4.5`.
293+
| Name | Description | Type | Default value |
294+
| --- | --- | --- | --- |
295+
| `title_color` | Card's title color. | string (hex color) | `2f80ed` |
296+
| `text_color` | Body text color. | string (hex color) | `434d58` |
297+
| `icon_color` | Icons color if available. | string (hex color) | `4c71f2` |
298+
| `border_color` | Card's border color. Does not apply when `hide_border` is enabled. | string (hex color) | `e4e2e2` |
299+
| `bg_color` | Card's background color. | string (hex color or a gradient in the form of *angle,start,end*) | `fffefe` |
300+
| `hide_border` | Hides the card's border. | boolean | `false` |
301+
| `theme` | Name of the theme, choose from [all available themes](themes/README.md). | enum | `default` |
302+
| `cache_seconds` | Sets the cache header manually (min: 21600, max: 86400). | integer | `1800` |
303+
| `locale` | Sets the language in the card, you can check full list of available locales [here](#available-locales). | enum | `en` |
304+
| `border_radius` | Corner rounding on the card. | number | `4.5` |
303305

304306
> [!WARNING]
305307
> 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 6 hours (21600 seconds). Also, note that the cache is clamped to a minimum of 6 hours and a maximum of 24 hours. If you want the data on your statistics card to be updated more often you can [deploy your own instance](#deploy-on-your-own) and set [environment variable](#disable-rate-limit-protections) `CACHE_SECONDS` to a value of your choosing.
@@ -366,47 +368,55 @@ If we don't support your language, please consider contributing! You can find mo
366368

367369
#### Stats Card Exclusive Options
368370

369-
- `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(comma-separated values)*. Default: `[] (blank array)`.
370-
- `hide_title` - *(boolean)*. Default: `false`.
371-
- `card_width` - Sets the card's width manually *(number)*. Default: `500px (approx.)`.
372-
- `hide_rank` - *(boolean)* hides the rank and automatically resizes the card width. Default: `false`.
373-
- `rank_icon` - Shows alternative rank icon (i.e. `github`, `percentile` or `default`). Default: `default`.
374-
- `show_icons` - *(boolean)*. Default: `false`.
375-
- `include_all_commits` - Counts total commits instead of just the current year commits *(boolean)*. Default: `false`.
376-
- `line_height` - Sets the line height between text *(number)*. Default: `25`.
377-
- `exclude_repo` - Excludes stars from specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
378-
- `custom_title` - Sets a custom title for the card. Default: `<username> GitHub Stats`.
379-
- `text_bold` - Uses bold text *(boolean)*. Default: `true`.
380-
- `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
381-
- `ring_color` - Color of the rank circle *(hex color)*. Defaults to the theme ring color if it exists and otherwise the title color.
382-
- `number_format` - Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
383-
- `show` - Shows [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started`, `discussions_answered`, `prs_merged` or `prs_merged_percentage`) *(Comma-separated values)*. Default: `[] (blank array)`.
371+
| Name | Description | Type | Default value |
372+
| --- | --- | --- | --- |
373+
| `hide` | Hides the [specified items](#hiding-individual-stats) from stats. | string (comma-separated values) | `null` |
374+
| `hide_title` | Hides the title of your stats card. | boolean | `false` |
375+
| `card_width` | Sets the card's width manually. | number | `500px (approx.)` |
376+
| `hide_rank` | Hides the rank and automatically resizes the card width. | boolean | `false` |
377+
| `rank_icon` | Shows alternative rank icon (i.e. `github`, `percentile` or `default`). | enum | `default` |
378+
| `show_icons` | Shows icons near all stats. | boolean | `false` |
379+
| `include_all_commits` | Count total commits instead of just the current year commits. | boolean | `false` |
380+
| `line_height` | Sets the line height between text. | integer | `25` |
381+
| `exclude_repo` | Excludes specified repositories. | string (comma-separated values) | `null` |
382+
| `custom_title` | Sets a custom title for the card. | string | `<username> GitHub Stats` |
383+
| `text_bold` | Uses bold text. | boolean | `true` |
384+
| `disable_animations` | Disables all animations in the card. | boolean | `false` |
385+
| `ring_color` | Color of the rank circle. | string (hex color) | `2f80ed` |
386+
| `number_format` | Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). | enum | `short` |
387+
| `show` | Shows [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started`, `discussions_answered`, `prs_merged` or `prs_merged_percentage`). | string (comma-separated values) | `null` |
384388

385389
> [!NOTE]\
386390
> When hide\_rank=`true`, the minimum card width is 270 px + the title length and padding.
387391
388392
#### Repo Card Exclusive Options
389393

390-
- `show_owner` - Shows the repo's owner name *(boolean)*. Default: `false`.
391-
- `description_lines_count` - Manually set the number of lines for the description *(number)*. Specified value will be clamped between 1 and 3. If this parameter is not specified, the number of lines will be automatically adjusted according to the actual length of the description. Default: `undefined`.
394+
| Name | Description | Type | Default value |
395+
| --- | --- | --- | --- |
396+
| `show_owner` | Shows the repo's owner name. | boolean | `false` |
397+
| `description_lines_count` | Manually set the number of lines for the description. Specified value will be clamped between 1 and 3. If this parameter is not specified, the number of lines will be automatically adjusted according to the actual length of the description. | number | `null` |
392398

393399
#### Gist Card Exclusive Options
394400

395-
- `show_owner` - Shows the gist's owner name *(boolean)*. Default: `false`.
401+
| Name | Description | Type | Default value |
402+
| --- | --- | --- | --- |
403+
| `show_owner` | Shows the gist's owner name. | boolean | `false` |
396404

397405
#### Language Card Exclusive Options
398406

399-
- `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
400-
- `hide_title` - *(boolean)*. Default: `false`.
401-
- `layout` - Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`.
402-
- `card_width` - Sets the card's width manually *(number)*. Default `300`.
403-
- `langs_count` - Shows more languages on the card, between 1-20 *(number)*. Default: `5` for `normal` and `donut`, `6` for other layouts.
404-
- `exclude_repo` - Excludes specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
405-
- `custom_title` - Sets a custom title for the card *(string)*. Default `Most Used Languages`.
406-
- `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
407-
- `hide_progress` - Uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
408-
- `size_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#language-stats-algorithm)), defaults to 1.
409-
- `count_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#language-stats-algorithm)), defaults to 0.
407+
| Name | Description | Type | Default value |
408+
| --- | --- | --- | --- |
409+
| `hide` | Hides the [specified languages](#hide-individual-languages) from card. | string (comma-separated values) | `null` |
410+
| `hide_title` | Hides the title of your card. | boolean | `false` |
411+
| `layout` | Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. | enum | `normal` |
412+
| `card_width` | Sets the card's width manually. | number | `300` |
413+
| `langs_count` | Shows more languages on the card, between 1-20. | integer | `5` for `normal` and `donut`, `6` for other layouts |
414+
| `exclude_repo` | Excludes specified repositories. | string (comma-separated values) | `null` |
415+
| `custom_title` | Sets a custom title for the card. | string | `Most Used Languages` |
416+
| `disable_animations` | Disables all animations in the card. | boolean | `false` |
417+
| `hide_progress` | Uses the compact layout option, hides percentages, and removes the bars. | boolean | `false` |
418+
| `size_weight` | Configures language stats algorithm (see [Language stats algorithm](#language-stats-algorithm)). | integer | `1` |
419+
| `count_weight` | Configures language stats algorithm (see [Language stats algorithm](#language-stats-algorithm)). | integer | `0` |
410420

411421
> [!WARNING]\
412422
> Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
@@ -415,16 +425,18 @@ If we don't support your language, please consider contributing! You can find mo
415425
416426
#### WakaTime Card Exclusive Options
417427

418-
- `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
419-
- `hide_title` - *(boolean)*. Default `false`.
420-
- `line_height` - Sets the line height between text *(number)*. Default `25`.
421-
- `hide_progress` - Hides the progress bar and percentage *(boolean)*. Default `false`.
422-
- `custom_title` - Sets a custom title for the card *(string)*. Default `WakaTime Stats`.
423-
- `layout` - Switches between two available layouts `default` & `compact`. Default `default`.
424-
- `langs_count` - Limits the number of languages on the card, defaults to all reported languages *(number)*.
425-
- `api_domain` - Sets 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`.
426-
- `display_format` - Sets the WakaTime stats display format. Choose `time` to display time-based stats or `percent` to show percentages. Default: `time`.
427-
- `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
428+
| Name | Description | Type | Default value |
429+
| --- | --- | --- | --- |
430+
| `hide` | Hides the languages specified from the card. | string (comma-separated values) | `null` |
431+
| `hide_title` | Hides the title of your card. | boolean | `false` |
432+
| `line_height` | Sets the line height between text. | integer | `25` |
433+
| `hide_progress` | Hides the progress bar and percentage. | boolean | `false` |
434+
| `custom_title` | Sets a custom title for the card. | string | `WakaTime Stats` |
435+
| `layout` | Switches between two available layouts `default` & `compact`. | enum | `default` |
436+
| `langs_count` | Limits the number of languages on the card, defaults to all reported languages. | integer | `null` |
437+
| `api_domain` | Sets 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 | `Waka API` |
438+
| `display_format` | Sets the WakaTime stats display format. Choose `time` to display time-based stats or `percent` to show percentages. | enum | `time` |
439+
| `disable_animations` | Disables all animations in the card. | boolean | `false` |
428440

429441
***
430442

0 commit comments

Comments
 (0)