Hashtags are getting a #makeover

Discourse has supported linking to categories (announcements) and tags (release-notes) for a long time using hashtags (#). With the introduction of Discourse Chat we wanted to be able to link to chat channels with hashtags, which required some overhauling of how the system works to allow for channels to be suggested with autocomplete and also to cook in posts and chat messages. We also decided to take the time to overhaul the design of the autocomplete menu and cooked hashtags.

A summary of the changes included with this overhaul:

  • The ability to search for chat channels if you have chat enabled
  • Hashtag search results prioritise exact matches based on the slug, and depending on whether you are using them in a post or a chat message, we prioritise different types of results (e.g. categories are at the top in a post, but channels are at the top in chat)
  • A distinct icon is shown for each result
  • A new style for cooked hashtags which include the distinct icon

The new autocomplete results:


The new cooked style for hashtag autocompletion, which closely matches the @mention style.

You can opt-in to using this new version of hashtag autocompletion and cooking by enabling the enable_experimental_hashtag_autocomplete site setting on your Discourse site:

We expect to make this the default in the new year, meanwhile this is still considered an experimental feature, so there are still a few things to fix and refine.

This feature is now enabled on Discourse Meta as well :sparkles:


An example of these new hashtags on Meta. Why not check out announcements ? Or read over some release-notes !


23 posts were split to a new topic: Add colour and subcategory styling to category and chat mentions

Here’s a quick example of what it looks like to link to a chat channel from a post: general

And here’s a quick example of what it looks like to link to a chat channel from another chat channel:

We're experimenting with a new hashtag feature that now supports chat: Hashtags are getting a #makeover

If you've got feedback or questions about it, please feel free to chime in on that topic or join hashtag feedback to chat about it


6 posts were split to a new topic: What rebake is required for the new autocomplete styling?

3 posts were split to a new topic: Restricted tags/tag groups not appearing in autocomplete

A post was split to a new topic: Change existing hashtags to the new design