expressjs.com icon indicating copy to clipboard operation
expressjs.com copied to clipboard

Remove Broken Links

Open jonchurch opened this issue 4 years ago • 3 comments

I noticed when looking at a PR that there are some links which have broken over time. Egregiously, there are a few links to a website called node-tricks.com which is now serving up some kind of phishing uglyness. You can see this link listed under the Blogs on the resources page.

I propose we attempt to rid the site of 404'd and other links which have succumb to bit rot, and this issue is a place to track those efforts.

I used a tool called broken-link-checker on only external links using the following command:

npx broken-link-checker https://expressjs.com/ -roi

Warning: that command took 15 minutes to complete when I ran it

It showed there's quite a few broken links, but this tool doesn't give me a good output of just broken links without writing a little code. I don't think it's really the tool we need (well someone could use it as a library and write something), but we need a list of all the unique broken links, and where they occur on the site so we can figure out the best way to fix them.

cc @expressjs/expressjs-com @wesleytodd @expressjs/triagers

jonchurch avatar Jan 22 '20 20:01 jonchurch

I agree. External links can change / break at any time, of course. This is my "pie in the sky": a Github action that would check our external link, maybe once a week or less often and open an issue for each one it finds for us humans to triage and fix. Having a manual script to run would be a first step of course, and still should be done even if we don't do the actions idea :)

dougwilson avatar Jan 22 '20 20:01 dougwilson

I started working on this today, here's some output that notes unique URLs throwing 404s and what pages they appear on.

https://gist.github.com/jonchurch/cb76aab0f4ec392f69f9d897ffb65397

These are external URLs throwing 404s. I ignored all internal URLs, but there were quite a few across the various translations that 404.

I started working on a github action that will check for 404s, if anyone wants to peek at what I was using for this (the action is work in progress, but it has the commands I used to generate this manually). Used this as an excuse to have some fun with gawk, so I don't really think its particularly maintainable.

jonchurch avatar Jan 23 '20 05:01 jonchurch

Not sure if this is the right place to post On Express Docs, page https://expressjs.com/en/advanced/best-practice-performance.html#strongloop-pm-as-an-upstart-service search for "Error Handling in Node.js" link, its href https://www.joyent.com/developers/node/design/errors is a 404

Chico-Carneiro avatar Oct 19 '23 10:10 Chico-Carneiro