tiddlyhost / tiddlyhost-com

Rails application for creating and hosting TiddlyWiki sites, plus resources for deploying it to https://tiddlyhost.com/
Other
184 stars 17 forks source link

Unexpected tags chosen for hub page tabs #177

Closed simonbaird closed 3 years ago

simonbaird commented 3 years ago

It's supposed to show the four most popular tags. Currently it shows 'rpg' even though if you click on it only two sites appear.

Compare https://tiddlyhost.com/hub/tag/rpg to https://tiddlyhost.com/hub/tag/plugin for example, which currently doesn't appear in the top 4.

(It might be because the rpg tag is used a lot in sites that aren't visible in the hub, but that's just a guess.)

simonbaird commented 3 years ago

My guess was correct:

irb(main):008:0> HubQuery.tags_for_searchable_sites.first(5).map{|t|"#{t.name} #{t.taggings_count}"}
=> ["test 20", "rpg 12", "personal 11", "TiddlyWiki 10", "plugin 10"]
simonbaird commented 3 years ago

Fixed it.