pyOpenSci / pyopensci.github.io

This is the website for pyOpenSci. Contributions welcome!!
https://www.pyopensci.org
Other
35 stars 61 forks source link

Lychee for link checking -- good but a few quirks too? #353

Closed lwasser closed 3 months ago

lwasser commented 3 months ago

@willingc added lychee in this pr #350 it is fast and seems good but i just tested it with a new bad link and it didn't catch it.

I wonder if we can play with it a bit to ensure

  1. it catches broken links and
  2. when we view the output, maybe we only need to look at the errors - not all of the links it looked at and skipped (once it's working as we wish).

Once we do that we can modify htmlproofer using the --checks arg to only look at images.

willingc commented 3 months ago

@lwasser do you have the action's output link for the bad link that it missed?

lwasser commented 3 months ago

@willingc check out this pr i just opened it for us to play with. i added a fake link

[bad link](https://www.pyopensci.org/verybadlink.html)

on the home page. htmlproofer caught it (if you look at the raw logs)

2024-04-02T22:07:15.9449129Z Checking 941 external links
2024-04-02T22:07:48.0759258Z Checking 115 internal links
2024-04-02T22:07:48.1111618Z Checking internal link hashes in 30 files
2024-04-02T22:07:48.7143638Z For the Links > External check, the following failures were found:
2024-04-02T22:07:48.7144315Z 
2024-04-02T22:07:48.7144477Z * At _site/index.html:349:
2024-04-02T22:07:48.7144793Z 
2024-04-02T22:07:48.7145313Z   External link https://www.pyopensci.org/verybadlink.html failed (status code 404)

but lychee did not / passed / i can't find the link in the lychee logs.

willingc commented 3 months ago

This is closed by #362 and #363

lwasser commented 3 months ago

thank you @willingc 💖