github-profile-card

Simple and easy to use widget with your GitHub profile — No dependencies

This project is maintained by piotrl

GitHub Profile Card

Widget shows your GitHub profile directly on your website.
Show your current projects — always up to date.

Screenshot

Live demo and configuration

Contents

Main features

Changelog

Quick install

Include script and style just before </body> tag:

<script type="text/javascript" src="https://piotrl.github.com/github-profile-card/dist/gh-profile-card.min.js"></script>

Include HTML code anywhere you would like to place widget:

<div id="github-card"
     data-username="YOUR_GITHUB_USERNAME">
</div>

Great! Widget will autoload. We’re done here.

Download

With npm

npm install github-profile-card --save

Advanced configuration

Configure widget in HTML:

<div id="github-card"
     data-username="YOUR_GITHUB_USERNAME"
     data-max-repos="3"
     data-sort-by="stars"
     data-header-text="Most starred repositories">
</div>

For special usages, it is possible to configure widget(s) in JavaScript. You have to use different template than #github-card.

var widget = new GitHubCard({
    username: 'YOUR_GITHUB_USERNAME'
    template: '#github-card-demo',
    sortBy: 'stars',
    reposHeaderText: 'Most starred',
    maxRepos: 5,
    hideTopLanguages: false,
});

widget.init();

Configuration options

HTML option (data- prefix) JavaScript option Default Details
username username None GitHub profile username
template #github-card DOM selector of your widget in HTML
sort-by sortBy stars Repositories sorting method (stars or updateTime)
max-repos maxRepos 5 Amount of listed repositories. 0 disables section
header-text headerText Most starred repositories Text label above repositories list
hide-top-languages hideTopLanguages false Avoids heavy network traffic for calculating Top Languages section. Recommended for profiles with huge amount of repositories.

FAQ

Feedback

I love feedback, send me one!

Remember no other libraries required. It’s like gluten free 😉

gluten-free