Would it be possible to remove all dead links from the forum?
AI-generated summary
The discussion revolves around finding and fixing broken links on the forum. Mirko initiated the conversation, suggesting removal of dead links, and Stephen questioned the criteria for determining a broken link. Stranik proposed creating a link parser to check the status of links in the Discourse database using a third-party plugin. Mittineague pointed out the existence of a topic_links table, which could simplify the task. Stranik further discussed the idea, highlighting the potential to extract, sort, and check links, and even integrating them with a catalog of sites. Mirko shared an image illustrating his issue with broken links, mainly to Amazon S3, which he cannot find when searching the forum by link.
What’s your criteria for a broken link?
Some CMS return 404’s when the current user doesn’t have access to the page, would that be considered broken?
Is it better users see the old broken link to help identify the new source? What would you show in their place?
Interest question. In the catalogs of sites (clone Dmoz) all existing links are checked for errors. In Discourse, the links are in the body of the document ( They are not stored in a separate table?). I think that it is possible to create a link parser from the Discourse database in order to check their status using a third-party plugin. And in the countdown, display the status of “broken” links and the number of the post.
Thinking of the topic_links table?
discourse/app/models/topic_link.rb at main · discourse/discourse · GitHub
If in a separate table (thanks, I will study), then, apparently, the task is simplified. I’ll free myself a bit and think about how to do it better. The goal is interesting, especially for communities where there are external links in many posts.
Added: an additional opportunity to work with links. In our case, we want to extract all the links, sort them, check the status of the links, “link weights” and add them to our catalog. Where catalog moderators could describe interesting resources.
So it is possible (in a specific case) to link Discourse and the base of sites in the form of a catalog.

