LoginSignup
2
1

More than 3 years have passed since last update.

GitHub Readme StatsのMost Used Languagesで特定の言語の非表示方法とハマりポイント

Last updated at Posted at 2020-09-19

GitHubのプロフィールをいい感じにしてくれるGitHub Readme StatsのMost Used Languagesで特定の言語を非表示にする方法で少しハマったので共有します。

Screen Shot 2020-09-19 at 11.54.42.png

今回はJupyter Notebook、C#、TeX、ShaderLabを非表示にします。

結論

クエリに隠したい言語を追加すればOKです。

README.md

<a href="https://github.com/anuraghazra/github-readme-stats">
    <img align="left" src="https://github-readme-stats.vercel.app/api?username=tetsuzawa&count_private=true&show_icons=true" />
</a>
<a href="https://github.com/anuraghazra/github-readme-stats">
    <img align="left" src="https://github-readme-stats.vercel.app/api/top-langs/?username=tetsuzawa&hide=jupyter%20notebook,shaderlab,tex,c%23&langs_count=9" />
</a>

説明

素の設定は以下のようになっています。

5行目

<img align="left" src="https://github-readme-stats.vercel.app/api/top-langs/?username=tetsuzawa" />

Screen Shot 2020-09-19 at 11.54.42.png

これにhide=XXX,YYYの形式で言語を追加します。

ポイントは空白は%20、#は%23のようにエスケープすることです。(大本のReadmeに言語指定の一覧が無く、ハマりポイントでした)

5行目

<img align="left" src="https://github-readme-stats.vercel.app/api/top-langs/?username=tetsuzawa&hide=jupyter%20notebook,shaderlab,tex,c%23" />

Screen Shot 2020-09-19 at 11.55.33.png

非表示にしたぶん表示数が減ってしまったのでlangs_count=Nのクエリで調整します。

5行目

<img align="left" src="https://github-readme-stats.vercel.app/api/top-langs/?username=tetsuzawa&hide=jupyter%20notebook,shaderlab,tex,c%23&langs_count=9" />

Screen Shot 2020-09-19 at 11.56.18.png

以上です。

参考

GitHub Readme Stats を利用してGitHubプロフィールをカッコよくする

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1