-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some simple-icons have slightly different names from their shields.io "logo"s #2980
Comments
Thanks for raising this. There are several slightly different issues to unpick here.
> const simpleIcons = require('simple-icons')
undefined
> simpleIcons['Visual Studio Code']
{ title: 'Visual Studio Code',
hex: '007ACC',
source: 'https://code.visualstudio.com',
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Visual Studio Code icon</title><path d="M24 2.5v19L18 24 0 18.5v-.561l18 1.545V0zM1 13.111L4.385 10 1 6.889l1.418-.827L5.853 8.65 12 3l3 1.456v11.088L12 17l-6.147-5.65-3.434 2.589zM7.644 10L12 13.283V6.717z"/></svg>' } The website also doesn't use a completely consistent naming scheme for the downloaded file names - AFAIK the filenames are just the filenames in: https://github.com/simple-icons/simple-icons/tree/develop/icons which mostly are just
That's why
works because it is just an alias for
/cc @RedSparr0w who may also have useful input on this. |
OK, I see that the main issue is that the simpleicons library doesn't expose the filenames. |
The shields.io full logo list is at the bottom of the website: https://shields.io And the full logo list for simple-icons is on their website: https://simpleicons.org/ |
Right, but my point is that the the second list is not quite all a shields.io user needs to use simpleicons, due to the naming differences. |
Oh yes - good point that the
I think a verbatim list of all 500 icons in the SimpleIcons set is a bit much, but we can definitely explain more clearly that the icon names should be used and give some examples. |
^ Great fix! |
Looking through the simple icons again, do you think it would be better if we just removed any non word characters? logoName = `just a.test_name0`
logoName.toLowerCase().replace(/[^a-z\d]/ig, '') // justatestname0 This way it wouldn't matter how the user entered it.
|
Having multiple equivalent versions is a bit worse for downstream caching, and also creates a bit more work in the long run because we have to ensure all the variants keep working. (Basically that means it's hard to refactor; we just have to keep the code forever.) So I'd prefer to transform the names into a slug that is optimally readable and uniform, and provide a searchable picker on our site with the name. I think that's a nicer experience for the end user than going out to the simpleicons site, anyway, and it's clearer what they're supposed to use if there's only one supported way. |
Are you experiencing an issue with...
🪲 Description
The required
logo
query parameter to use the VS Code logo fromsimple-icons
does not match the expected value. I expectedvisualstudiocode
to work (this is what the icon is named insimple-icons
, butvisual-studio-code
was required. Similarly,eclipse
is required, noteclipse-ide
.🔗 Link to the badge
I provided a series of examples at simple-icons/simple-icons#1211
Pasting them below:

However, even though the Eclipse icon is named
eclipseide.svg
, I have to passlogo=eclipse
(NOTeclipseide
) to get the Eclipse icon to resolve.
So I suspect there might be a similar naming issue that's preventing me from getting VS Code (
visualstudiocode.svg
) to work.

and, thanks to the maintainer of

simple-icons
, (see issue linked above) here's a working VS Code badge:
Here they are in action (looks awesome, the logos are a fantastic new feature!)
To summarize, I would like to know why these two logos (and likely at least a few others) don't match their names in
simple-icons
. What is transformingvisualstudiocode
intovisual-studio-code
andeclipseide
intoeclipse
, and is this documented anywhere?The text was updated successfully, but these errors were encountered: