Skip to content
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

Provide meta data in icon JSON files #47

Open
CreativeDive opened this issue Jul 21, 2022 · 4 comments
Open

Provide meta data in icon JSON files #47

CreativeDive opened this issue Jul 21, 2022 · 4 comments

Comments

@CreativeDive
Copy link

Hey, first of all thank you for your great work.

I'm wondering if it's possible to include meta data like "search terms" in the json files for each icon if the library provides it?

@cyberalien
Copy link
Member

Sure, you can add custom stuff to files.

I think search terms do make sense. It could be very useful.

@CreativeDive
Copy link
Author

@cyberalien Yes that would be very useful. Everyone could benefit from it if this were already included in iconify.

But I also understand if you want to keep the json files light.

@cyberalien
Copy link
Member

Yes, I do want to keep files light, but this specific use case sound really good. I'm immediately considering how this could be used.

If I'm not mistaken, several icon sets already do have metadata for that, so it could be filled immediately. Problem is with search engine, which will not use it for a while until I'll finally refactor it, but at least there will be possibility for future.

As a bonus, I'm planning to add function for publishing icon sets from Figma and this would allow designers to set alternative keywords for icons.

Downside is, possibility for search results spam. Same icons appearing for different keywords might lead to bad search results, so this needs to be considered. One possible solution is to show search terms matches after direct keyword matches.

So overall I think this is a really good suggestion. It could be something like this:

interface IconifyMetaData {
   // ... other stuff

   // Keywords. Key is icon name, value is array of search terms
   keywords: Record<string, string[]>;
}

@CreativeDive
Copy link
Author

... but at least there will be possibility for future.

Thank you. This sounds very good. Anyone who uses iconify and supplies thousands of icons with it will certainly be happy about a solution for searching for the icons. If the search terms are included, then that would be very helpful.

Thanks for your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants