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

check for dead links? #170

Open
hansvancalster opened this issue Jun 24, 2020 · 9 comments
Open

check for dead links? #170

hansvancalster opened this issue Jun 24, 2020 · 9 comments
Assignees
Milestone

Comments

@hansvancalster
Copy link
Contributor

The tutorials website contains a lot of hyperlinks to websites. Would it be worthwhile/possible to check for dead links during continuous integration?

@hansvancalster hansvancalster added this to the >2020 milestone Jun 24, 2020
@florisvdh
Copy link
Member

Great idea @hansvancalster 👍 Who knows how to do this?

@niconoe
Copy link
Contributor

niconoe commented Sep 17, 2021

I'll try to find a solution for that!

@LienReyserhove LienReyserhove modified the milestones: >2020, 2021 Sep 17, 2021
@niconoe
Copy link
Contributor

niconoe commented Oct 26, 2021

Update:

I'm working on this and found a nice tool to do that: https://github.com/stevenvachon/broken-link-checker. Apparently there's already a GitHub action to easily run it: https://github.com/marketplace/actions/broken-link-check

There are a still few things that bother me, to think about:

  • The GitHub Action takes an URL, which means we can only run it after the site have been deployed to GitHub pages (at the end of the process: no pre-publish check, no check on PR, ...)
  • That tool is very verbose (list all the links, broken or not), and no super easy solution exist for it yet (PR ignored by the maintainer)
  • Given the number of links to check, the tool takes quite long to run (14 minutes for a test run on my machine)

to be continued soon!

@hansvancalster
Copy link
Contributor Author

@niconoe, maybe https://httr.r-lib.org/reference/http_error.html can form the basis of a lightweight check?

@niconoe
Copy link
Contributor

niconoe commented Nov 2, 2021

@hansvancalster: thanks! Indeed, we could implement out own checks using R (or other) HTTP libraries. I think I'm however more inclined to use an existing tool that should already handle all the gory details (redirections, possibility to ignore links ignored by robots, make the distinction between internal and external links, ...)

@damianooldoni
Copy link
Member

I can try to check this in 2023 based my experience with GitHub Actions.

@damianooldoni
Copy link
Member

A small update: the world of GitHub Acions is rapidly evolving and so I founded an action which seems more promising as it has already implemented the functionality of adding issues for any broken link found:
https://github.com/marketplace/actions/broken-link-checker-action

@damianooldoni
Copy link
Member

damianooldoni commented Jan 18, 2023

Update part 2: the GitHub Action I mentioned above is however archived and read only. That means no maintenance will follow, so I think it's not the best idea to proceed with that.

I found this other actively maintained GitHub Action which produce reports and will fail if broken links are present. No issues are created, which is maybe even better: I don't want this repo flooded with issues 😄 a failure action (red cross) is enough.

https://github.com/marketplace/actions/broken-web-link-checker

@damianooldoni
Copy link
Member

GitHub Action implemented on my dummy test-workflows repo, see (yml file), but I got an error: package aurora is not found. issue reported to the author, see elliotforbes/broken-link-checker#2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants