Everything you need to know about Yet Another GitHub Card
Get your HTML embed code at the official website. Simply fill in the form with your GitHub username and grab the result code.
The easiest way to add the GitHub card to your website is by using the embed code generator. Visit the homepage, enter your GitHub username, and copy the generated HTML.
You can install Yet Another GitHub Card using your preferred package manager:
npm install yet-another-github-card --save
yarn add yet-another-github-card
composer require yet-another-github-card
The package folder structure looks like this:
yet-another-github-card/
├─ css/
├─ images/
| ├─ docs/
| ├─ favicon_io/
├─ themes/
└─ utils/
└─ js/
Customize your GitHub card using the following data attributes:
| Name | Description | Default Value |
|---|---|---|
data-style |
Set header background theme | defaultTheme |
data-user |
Your GitHub username | "" |
data-user-stars |
Count all obtained stars (repos + gists) | true |
data-user-stats |
Show selected stats (commits, contributions, followers, following, prs) | [{"name": "commits"}, {"name": "prs"}] |
<github-card
data-user="yourusername"
data-style="defaultTheme"
data-user-stars="true"
data-user-stats='[{"name":"commits"},{"name":"prs"}]'
></github-card>
At the moment, three prebuilt themes are available. Feel free to design unique cards by selecting your own colors and backgrounds!
The classic theme with a clean, professional look.
data-style="defaultTheme"
A soft, cloud-inspired background theme.
data-style="cloud"
Modern geometric patterns for a contemporary look.
data-style="polygon"
The source includes resources for building and running your GitHub Card locally. If you want to see it in action, follow these steps:
Open the file utils/index.html with your code editor and locate the custom element github-card.
data-user attribute with your own GitHub usernamedata-user-stars and data-user-statsnpm run compile-demo
The folder demo will be created with all required files.
npm run server-watch
npm run build-demo
New contributors are always welcome! If you have ideas for improvements or find bugs, please: