DenverCoder1 / custom-icon-badges

🛡 Allows users to more easily use Octicons and their own icons and logos on shields.io badges
https://custom-icon-badges.demolab.com
MIT License
546 stars 84 forks source link

🚀 Feature: Increasing SVG icon libraries count #922

Open kubinka0505 opened 1 year ago

kubinka0505 commented 1 year ago

Description

I see that this repository adds only one icon library, aside of SimpleIcons used by shields.io, which is a shame.

Is there a possibility of adding more icon libraries? I understand that this increase bandwidth or cause other issues, nonetheless I dare to say that amounts of icons in the Octicons library may be insufficient for some cases, since there are only around 250 of them, which - compared to library used by shields - feels like a small fraction.

Here is a table (sorted by stars amount) containing worth-checking repositories with icons: Supported Repository Author Icons1 Stars Primary Language License
#959 feather feathericons 1953 23787 84.3% JavaScript MIT
ionicons ionic-team 1338 17032 76.7% TypeScript MIT
tabler-icons tabler 4619 15862 56.3% HTML MIT
flag-icons lipis 268 9657 59.8% CSS MIT
icons twbs 287 6856 96.4% JavaScript MIT
weather-icons erikflowers 222 6721 59.7% CSS SIL OFL 1.1

1 - esmaited amount, counted from repository files


If introduced - what I'm looking straightforward to - libraries in URLs can be distinguished by their names.

DenverCoder1 commented 1 year ago

Sounds like a good idea, maybe an alternative for hyphenating the logo names could be to supply the source as a path or query parameter, for example /badge/custom-badge-blue.svg?logo=star&logoSource=octicons. That way it would be easier to determine the source to look in without splitting the logo name and requiring some names to be reserved.

To avoid making it a breaking change, the default behavior would of course be to default to octicons then the database then shields.io (simpleicons) if the source is not specified. The database and Shields.io could always be used as a fallback if the specified logo is not found in the specified source.

DenverCoder1 commented 12 months ago

Added support for feather icons in #959