···2233This configuration file includes a feed that watches for posts with a tag. The feed is then sorted by a simple "popular" algorithm that takes into account the number of likes, replies, and quotes.
4455+## How It Works
66+77+The configuration file includes the `query` block that sets the query to sort by popular. The popular algorithm is relatively simple:
88+99+ S / pow((T + 2), G)
1010+1111+`S` is the score of the post. When the post is first encountered, it is given a score of 1. Each time a reply is made or the post is liked, the score is incremented by 1.
1212+1313+`T` is the time since the post was created in hours.
1414+1515+`G` is the gravity factor. The higher the gravity, the faster the score will decrease over time.
1616+1717+If two posts have the same score, then they are sorted by the time they were indexed by Supercell.
1818+519## Instructions
6207211. Create the feed and replace `ATURI` with the full record AT-URI. Should look like `at://YOUR_DID/app.bsky.feed.generator/some_rkey`
+4
examples/popular/config.yml
···22- uri: "ATURI"
33 name: "Popular"
44 description: "Popular posts with the tag #Supercell."
55+ query:
66+ type: popular
77+ gravity: 2.0
88+ limit: 300
59 matchers:
610 - type: rhai
711 script: "/path/to/popular.rhai"