Show more hashtags on Mastodon UI

 Sun, 07 Jan 2024 17:21 UTC

Show more hashtags on Mastodon UI
Image: CC BY 4.0 by cybrkyd

The default number of hashtags shown on Mastodon’s web UI is 10. This also translates over to a few apps like Tusky. Others - like Fedilab - show everything or at least a lot more than the default 10.

How to increase the number of hashtags shown on Mastodon

The hashtags are pulled in via an API call, so this file needs to be edited: app/controllers/api/v1/trends/tags_controller.rb

Navigate to your installation folder and open it.

$ sudo -u mastodon nano tags_controller.rb

Find this line near the top: DEFAULT_TAGS_LIMIT = 10 and change it to whatever value you want; I went with 40.


Save and close the file.

This change does not require a re-compile so simply refresh the web service:

$ systemctl restart mastodon-web

Refresh your page and the change will be immediately visible.

Good news! Tusky (my favourite app) will also show the increased number of hashtags.