Repository:

https://github.com/discourse/discourse-category-icons

Installation instructions: https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682

What this does?

This component allows category badge links to have icons next to the category name. Here is an example of how this would look, with category style set to none:

image: 690x269

Here is how this would look with category style set to box:

image: 690x264

Configuration is pretty straightforward:

image: 690x406, 75%

Note that this component also lets you override the category lock icon used to denote private categories.

January 2020 update: thanks to @rogerco, you can now use the “partial” keyword to partially match category slugs (i.e. entering “book,icon,red,partial” would match all category slugs containing “book”).

Issues

  • Does not correctly respect the icon color when using with the bullet category style. In general, though, this shouldn’t be used with the bullet or bar category styles, the UI would be unnecessarily busy.

See also the Tag Icons component, which does the same thing for tags.