How to add a GitHub Follow button to your Website?

GitHub is a very popular Git repository hosting service, that provides a web-based graphical user interface to use Git revision control system with many added features. People generally add their gits on there, and fork & follow other GitHubbers’ gits.

Nowadays people host their projects on GitHub and put the links to these projects on their websites and blogs to send the visitors directly to their Gits. This post focuses on how to add a GitHub follow button to your website or blog for your particular projects.

GitHub Follow button: Code and Parameters

Although GitHub doesn’t provide any official follow button to use on sites and blogs, but their is an unofficial way to do that. Below are some snippets that can help you show the GitHub follow button on your site in different formats.

The basic GitHub follow button

Adding the below code will display a simple and compact GitHub follow button on your site:
GitHub follow button: Compact

<iframe src="http://ghbtns.com/github-btn.html?user=your_github_username&repo=your_repository_name&type=follow"
  allowtransparency="true" frameborder="0" scrolling="0" width="132" height="20"></iframe>

GitHub follow button with count

This code will add a horizontal followers count bubble to your GitHub button:
GitHub follow button: Compact size with followers Count

<iframe src="http://ghbtns.com/github-btn.html?user=your_github_username&repo=your_repository_name&count=true&type=follow"
  allowtransparency="true" frameborder="0" scrolling="0" width="165" height="20"></iframe>

The Large GitHub follow button

If you want your follow button to appear large, then add the following code to your site:
GitHub follow button: Large size

<iframe src="http://ghbtns.com/github-btn.html?user=your_github_username&repo=your_repository_name&size=large&type=follow"
  allowtransparency="true" frameborder="0" scrolling="0" width="170" height="20"></iframe>

Large GitHub follow button with count

Here comes the large GitHub button with followers count in a horizontal bubble:
GitHub follow button: Large size with followers Count

<iframe src="http://ghbtns.com/github-btn.html?user=your_github_username&repo=your_repository_name&size=large&type=follow"
  allowtransparency="true" frameborder="0" scrolling="0" width="225" height="30"></iframe>

The below table lists the different parameters used in the GitHub follow button along with their valid values:

Parameter Possible values
user Your username
repo Name of your GitHub repository
count none (default) or true
size none (default) or large
Loading Comments...