TIL(210825): Shields.IOバッジ、All Configurators、Refactoring第2版外


1. Shields.ioバッジをきれいに描く



上のようにもっときれいに描く方法を知りました!

  • 基本状態のバッジを用意します.
    コード:https://img.shields.io/npm/v/@every-analytics/react-analytics-provider.svg


  • Query Parameter style=for-the-badgeを追加します.
    コード:https://img.shields.io/npm/v/@every-analytics/react-analytics-provider.svg?style=for-the-badge

  • Query Parameter labelColorを追加し、labelの背景色を変更します.
    コード:https://img.shields.io/npm/v/@every-analytics/react-analytics-provider.svg?style=for-the-badge&labelColor=blue

  • Query Parameter logoを追加することで、labelにアイコンを追加できます.(可能なアイコン:simple icons)
    カスタム画像をbase 64 stringに入れることもできます!
    コード:https://img.shields.io/npm/v/@every-analytics/react-analytics-provider.svg?style=for-the-badge&labelColor=000000&logo=npm

  • Query Parameter logoColorを追加してアイコンの色を変更できると聞きましたが、だめです、ほほほ
    コード:https://img.shields.io/npm/v/@every-analytics/react-analytics-provider.svg?style=for-the-badge&labelColor=000000&logo=npm&logoColor=000000
  • 2. All Contributors



    上図のようにGitHubドキュメントにContributorsリストを追加できるサービスです.
    次の手順で設定できます.
  • .all-contributersrc
  • の追加
    {
      "projectName": "REPOSITORYR_NAME",
      "projectOwner": "REPOSITORY_OWNER_NAME",
      "files": [
        "README.md"
      ],
      "imageSize": 100,
      "commit": false,
      "contributors": [
      ],
      "contributorsPerLine": 7,
      "repoType": "github",
      "repoHost": "https://github.com",
      "skipCi": false
    }
  • README.mdの任意の位置にテーブル挿入コード
  • を記述する
    <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
    <!-- prettier-ignore-start -->
    
    <!-- prettier-ignore-end -->
    <!-- ALL-CONTRIBUTORS-LIST:END -->
  • 下記リンクにAll Contributors GitHub Appをインストール!
    https://github.com/apps/allcontributors/installations/new
  • 今どんな話題/PRにも下記のようにメッセージを

    これでPRが生まれました.

    滞在するとこんな取材者が増える!