npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-profile-card

v3.1.0

Published

Widget for presenting your GitHub profile on your website. Pure JavaScript.

Downloads

18

Readme

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

  • Top languages statistics
  • Last updated repositories
  • Configurable in HTML
  • Copy-Paste installation
  • No jQuery and any other libraries required

Changelog

Quick install

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

<script type="text/javascript" src="https://github-profile.com/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

  • My language statistic is affected by libraries and dependencies

    Consider ignoring them with .gitattributes: My repository is detected as the wrong language

  • How language statistic is build?

    It is sum of all characters written in language you use. One big repository in C# will be ranked higher than many small JavaScript repositories.

    It is based on 10 last updated repositories, to represent your current interests.

  • How to show two or more profiles on page?

    You have to create two widgets with different ID, then initialize each manually in JS.

    e.g.

    <div id="github-card-1" data-username="user1"></div>
    <div id="github-card-2" data-username="user2"></div>
    
    <script>
        new GitHubCard({ template: '#github-card-1' }).init();
        new GitHubCard({ template: '#github-card-2' }).init();
    </script>

Feedback

I love feedback, send me one!

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

gluten-free