tbh I really don't know for this solution, but you might like nextcloud, it's exactly what you're looking for, each part of the site is connected in that way.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
replies: