Skip to content

API that generates GitHub-themed SVGs that show the percentage of a language in public repositories

License

Notifications You must be signed in to change notification settings

yehwankim23/github-profile-languages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Profile Languages

API that generates GitHub-themed SVGs that show the percentage of a language in public repositories

Inspired by GitHub Readme Stats and Shields.io

Preview

Dark Themes

Language Bar:

Language bar preview (dark)

Language Button (default, high contrast, dimmed):

Language button preview (dark default)Language button preview (dark high contrast)Language button preview (dark dimmed)

Light Themes

Language Bar:

Language bar preview (light)

Language Button (default, high contrast):

Language button preview (light default)Language button preview (light high contrast)

Deployment

  1. Fork this repository

  2. Generate a GitHub personal access token with public_repo permission

Deployment (GitHub personal access token)

  1. Go to Vercel and Continue with GitHub

Deployment (Continue with GitHub)

  1. Click Add New... > Project

Deployment (Add New... > Project)

  1. Find your repository and click Import

Deployment (Import)

  1. Click Environment Variables and add GPL_TOKEN and GPL_USERNAME

Deployment (Environment Variables)

  1. (Optional) Add languages that you want to ignore as comma-separated values (no spaces)

Supported languages

Deployment (ignore)

  1. Click Deploy

  2. Click Continue to Dashboard

  3. Check your domains under DOMAINS

Deployment (ignore)

Usage

Language Bar

Copy and paste the following Markdown and change DOMAIN, WIDTH, and THEME

Supported themes

[![GitHub Profile Language Bar](DOMAIN/api/bar?width=WIDTH&theme=THEME)](https://github.com/yehwankim23/github-profile-languages)

Example:

  • DOMAINhttps://github-profile-languages.vercel.app
  • WIDTH830
  • THEMEdark
[![GitHub Profile Language Bar](https://github-profile-languages.vercel.app/api/bar?width=830&theme=dark)](https://github.com/yehwankim23/github-profile-languages)

Result:

GitHub Profile Language Bar

Language Button

Copy and paste the following Markdown and change DOMAIN, LANGUAGE, and THEME

Supported languages

Supported themes

[![GitHub Profile Language Button](DOMAIN/api/button?language=LANGUAGE&theme=THEME)](https://github.com/yehwankim23/github-profile-languages)

Example:

  • DOMAINhttps://github-profile-languages.vercel.app
  • LANGUAGEC%2b%2b (Percent-encoded "C++")
  • THEMEdark
[![GitHub Profile Language Button](https://github-profile-languages.vercel.app/api/button?language=C%2b%2b&theme=dark)](https://github.com/yehwankim23/github-profile-languages)

Result:

GitHub Profile Language Button

Language Stats

Visit DOMAIN/api/stats for raw language statistics

Example:

  • DOMAINhttps://github-profile-languages.vercel.app

https://github-profile-languages.vercel.app/api/stats

Result:

Usage (stats)

Or use the username parameter to specify a user

Example:

  • DOMAINhttps://github-profile-languages.vercel.app
  • USERNAMEyehwankim23

https://github-profile-languages.vercel.app/api/stats?username=yehwankim23

Percent-encoding

ASCII 2x ASCII 3x ASCII 4x ASCII 5x ASCII 6x ASCII 7x
space %20 : %3a @ %40 [ %5b ` %60 { %7b
! %21 ; %3b \ %5c | %7c
" %22 < %3c ] %5d } %7d
# %23 = %3d ^ %5e ~ %7e
$ %24 > %3e _ %5f
% %25 ? %3f
& %26
' %27
( %28
) %29
* %2a
+ %2b
, %2c
- %2d
. %2e
/ %2f