エンジニアをリングする

プログラをミングしたり。

my web site twitter

Github star/fork/followソーシャルボタン設置方法

ソーシャルボタンチックなGithubのstarボタンを発見しました!(非公式)

GitHub Buttons

設置方法

star

<iframe src="http://ghbtns.com/github-btn.html?user=ユーザー名&repo=リポジトリ名&type=watch&count=true"
  allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>

fork

<iframe src="http://ghbtns.com/github-btn.html?user=ユーザー名&repo=リポジトリ名&type=fork&count=true"
  allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe>

follow

<iframe src="http://ghbtns.com/github-btn.html?ユーザー名&type=follow&count=true"
  allowtransparency="true" frameborder="0" scrolling="0" width="165" height="20"></iframe>

オプション

iframeのsrcのURLに&つなぎでパラメータをくっつけます。

  • カウント表示 count=true(表示したくないときはfalse)
  • Lサイズ size=large

※両方とも、widthやheightの値も変わるので、GithubのExamplesからコピペしてユーザー名とリポジトリ名書き換えるのが吉。

めっちゃかわいいですね。非公式とは思えない。
一行で設置できるのもありがたいです。
でも非公式だからか、日本のサイトではあまり見かけない印象。
Githubでソース公開してるプラグインのサイトとかにはすごくいいのではないでしょうか!
おすすめです。