Not sure of the complexity here, but one thing I have always wanted in a blogging system is the ability for any one of my own posts that I’ve linked in a later post to be able to have a “posts linking to this one” section. I’m thinking right now of templating like exists now for {post-list}
and {recent-posts}
, that could be called in our template with {backlinks}
.
I second this idea, not only because of the reasons listed by @bix but also because this can allow you to have a bare digital garden of sorts. I don’t know about the complexity of implementing this either, though.
Will be digging into this soon. It’s technically challenging, mostly for performance reasons, but I’m hopeful that there will be some kind of sane way to pull it off!
I’ve wondered about the performance thing. Like, in my head, I figured that the initialization would be taxing, depending on how many posts one has, but wasn’t sure how taxing some version of “on publish, check for canonical URL links, grab slug (or whatever), add backlink info to slug’s post’s info, republish slug’s post” would need to be.
I am also interested in adding backlinks to my posts, and if it’s not possible at the moment, I would also like to add links to other posts with the same tag directly on the post.
I didn’t think that building the backlinks would be that expensive; loop through the pages once to get the backlinks, and then again to build the pages as normal, and adding the backlinks if there are any to that page. Is that not performant enough?
The tag-based list is a neat idea, and since we already have a separate table for tag data, it wouldn’t be too challenging to add that.
I agree that the backlinks flow you described sounds simple; it’s all of the other factors and edge cases (like URL structures changing at the configuration level, or post titles/slugs changing with downstream impacts to post URLs, and things like that) which were filling my head with concern last month. I think the next action here, when I have time, is to simply build out a backlinks table structure and then dive in with some code to see what happens in reality!