Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate all issues with broken links #957

Closed
ShashankaNataraj opened this issue Feb 12, 2017 · 9 comments
Closed

Eliminate all issues with broken links #957

ShashankaNataraj opened this issue Feb 12, 2017 · 9 comments

Comments

@ShashankaNataraj
Copy link

ShashankaNataraj commented Feb 12, 2017

How about writing an e2e test suite which can be run by devs which programmatically click all the links on the site and log all broken links? Would it bring down all the issues with broken links on this repo seeing that eliminating broken links would then be a one time process?

@Sicaine
Copy link

Sicaine commented Feb 12, 2017

Probably but someone has to do it and to maintain it.

It might be easier to just track 404 errors. But for that, someone needs access to logs (anonymisised)

@jnavila
Copy link
Contributor

jnavila commented Feb 12, 2017

When developing the new publishing script for progit2 books, I used linkchecker to assert that all the internal links are indeed pointing to an existing anchor.

@ShashankaNataraj
Copy link
Author

@Sicaine Tracking 404 errors is a reactive way of dealing with the errors IMHO. I'd be willing to contribute to the e2e tests if we decide to go that way. I see this project already uses grunt. How hard could it be to just crawl the links and log 404s.

@jnavila does it have grunt integration? I found this: https://github.com/ChrisWren/grunt-link-checker

sxlijin pushed a commit to sxlijin/git-scm.com that referenced this issue Mar 16, 2017
Adds a build matrix entry that uses the broken-link-checker node module to crawl
https://git-scm.com, searching through the site recursively, and attempting all
links, reporting if they succeed or fail. This should make it easier to identify
broken links on the site. (Closes git#957.)

Also moves the sudo: line to the top of the file for style (it's a global build
matrix configuration, so it only seems right that it belongs with the other
global config settings up top).
@pedrorijo91
Copy link
Member

seems useful: https://github.com/endymion/link-checker

@pedrorijo91
Copy link
Member

many dead links can be found using http://www.brokenlinkcheck.com/broken-links.php#status

@lawrence-dass
Copy link

I'd like to work on this, please.

@pedrorijo91
Copy link
Member

hey @Lawrence4code :) thank you for your interest!

As you can see through the comments, we never investigated a solution for this problem. Do you already have any ideas on how to solve this? If not, we can try to brainstorm some possible implementation

@dscho
Copy link
Member

dscho commented Sep 24, 2024

The site now uses lychee in its PR builds. This only checks the internal links, though, to avoid network problems causing issues to be opened. Nevertheless, it would probably make for a fine Hacktoberfest project to run it manually including external links, and then to fix those.

One could start right off the bat with removing the Packtpub links, as per #1864.

@dscho
Copy link
Member

dscho commented Oct 25, 2024

Let's just close this, there has not been enough activity to merit keeping this ticket open.

If anybody wants to pick this up, it could be done by first copy/editing ci.yml to add a weekly GitHub workflow that runs lychee in non---offline mode, to identify the currently broken external links.

@dscho dscho closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants