How 'keep reading' picks related posts now

The "keep reading" block under every post and note used to pick its suggestions by counting shared tags. Most matches won.

That sounds reasonable until you look at my tags. The ai tag alone sits on 186 of my 637 posts and notes, so sharing it counted for as much as sharing something rare like hetzner. Hundreds of candidates tied at one shared tag, the tiebreakers collapsed, and the sort quietly turned into "show the newest thing tagged ai".

Three things stood out when I finally measured it.

So now it scores every pair of entries instead of sorting them, and four things feed that score.

  1. shared tags, weighted so rare ones count for more than common ones
  2. how similar the titles and descriptions are
  3. internal links, counted both ways, so linking A to B also points B back at A
  4. recency, but only enough to break ties

The title matching did most of the heavy lifting here. Around 40% of my entries carry a single tag, so tags were never going to say much about them, but titles always do. The internal links I add by hand turned out to be the most trustworthy signal of the lot.

Where it landed.

I can also pin suggestions from the frontmatter now, where scoring fills whatever slots are left.

related:
- /blog/some-post/
- /raw/some-note/

It all runs once at build time instead of per page, so the build did not get any slower. I had reorganized this block once before, and this time it is the matching underneath that got fixed.