Category Icons

I’ve made 3 additions I’ve really wanted to see.

Feature 1 — Category logo as category icon

Simply upload the SVG or PNG in the category settings under Category settings > Images > Category Logo Image. No need to mess with a custom sprite sheet!

Settings

I second this, it would be extremely nice to have everything configurable from the respective category pages themselves. I think this feature may be the next closest thing, if you’re okay with using the category logo as the category icon.


Additionally, you’re now able to use 2 types of emojis!

Feature 2 — Native system emoji as category icon

Simply use the native emoji keyboard on your iOS, macOS, or other device to input a single Unicode emoji character.

Settings


Feature 3 — Discourse emoji as category icon (+ pro tip!)

Use Discourse’s hosted emoji set! Simply type the emoji shorthand such as :grinning: which will render → :grinning:

Pro tip

If you want to upload a custom category icon without replacing the category logo, this is a great solution. Simply upload the icon as an emoji under Admin > Customize > Emoji. Then, use the emoji’s :shorthand:.

Settings


Native emojis, Discourse emojis, and Font Awesome icons can all be hodgepodge’d as well, if that’s how you roll…

Settings


While developing this, I had some questions @pmusaraj

Can we potentially remove the partial option altogether and replace the category slug with the category id to solve the issue of subcategories sharing the same slug? If I wanted different icons for subcategories that shared the same slug, this would also be a solution. Because ids are more unique they seem like the logical approach and less prone to breakage (unless they delete a category I assume, but does doing that reassign every category id?).

Also, is the svg-icons setting still necessary? (The Font Awesome icons will still render without specifying them there.)

9 Likes