Skip to content

Alias for the icon name to accomodate technologies being renamed #327

@Thomas-Boi

Description

@Thomas-Boi

Hello all,

I've been going over old issues. One of them involves creating alias for the name of technology because they got renamed. I think that this is a necessary feature to accommodate future changes or different naming scheme (dot-net and dotnet for example).

Here is a devicon.json object that we have:

    {
        "name": "oracle",
        "tags": [
            "database"
        ],
        "versions": {
            "svg": [
                "original"
            ],
            "font": [
                "original"
            ]
        },
        "color": "#EA1B22",
        "aliases": [
            {
                "base": "original",
                "alias": "plain"
            }
        ]
    }

Based on this current interface, I can think of these solutions:

  • Create a new attribute called aka. It will be a string[] that would look like this:

    {
      "name": "dot-net",
      "aka": [
        "dotnet"
      ]
    }
    

    or

    {
      "name": "node-webkit",
      "aka": [
        "nwjs"
      ]
    }
    
    • If there are no other names, aka would be an empty array/list.
    • Some cases (such as angular vs angularjs) would not need the aliases if it's at the end of the name. I can add something in the CONTRIBUTING.md for that.
  • Create a new attribute called aliases that would keep track of aliases of the technology name. The current aliases attribute (which tracks the versions) will be moved inside the versions attribute. It would also be renamed to font-aliases for clear distinction. It can look like this:

    {
        "name": "oracle",
        "aliases": [],
        "tags": [
            "database"
        ],
        "versions": {
            "svg": [
                "original"
            ],
            "font": [
                "original"
            ],
            "font-aliases": [
            {
                "base": "original",
                "alias": "plain"
            }
        ]
        },
        "color": "#EA1B22"
    }

In order to achieve any of the above changes, we will need to:

  • Create a convert script (easy for either of the above solutions)
  • Add an extra step in our css generation task to create the name aliases.

Priority: Low (in my opinion). We can do this after the gh-pages migration and the npm publish workflow.

Let me know what you guys think. Feedback are welcome :)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions