docs.lightning.engineering icon indicating copy to clipboard operation
docs.lightning.engineering copied to clipboard

lint: Add GH action to find HTTP resources returning a 404 error code

Open dstadulis opened this issue 1 year ago • 4 comments

Fixes https://github.com/lightninglabs/docs.lightning.engineering/issues/365

Pull Request Checklist

  • [ ] The documents updated are not in the docs/ directory. These files are synced from upstream repositories (lnd, lit, loop, pool and faraday), and should be updated in their parent repo.

dstadulis avatar Jul 17 '24 23:07 dstadulis

I've checked all the broken links and have fixed most of them, either by removing them or by finding the new destinations. A lot of them were in documents that are no longer available through the Builder's Guides. I have removed these pages entirely. What is left are these. I have also left my comments below as to why I didn't clean them up or what needs to be done to fix them too.

  • SHOULD_BE_HTTPS - http://localhost:3000/ in the file build-a-lapp/local-cluster-setup-with-polar/run-the-app-without-lnd.md:12 Localhost, not https

  • ERR_INVALID_URL - httpRequestMessage, cert, cetChain, policyErrors in the file docs/lnd/grpc/c#.md:83 Not a URL

  • 404 - https://github.com/lightningnetwork/lnd/tree/master/lntemp in the file docs/lnd/release-notes/release-notes-0.16.0.md:516 Document doesn't exist anymore. We tend not to edit past release notes. If we have to, we could simply remove the link

  • 404 - https://github.com/lightning/bolts/pull/1092/commits/e0ee59f3c92b7c98be8dfc47b7db358b45baf9de in the file docs/lnd/release-notes/release-notes-0.18.0.md:494 We could link to the pull request only. But we tend to not edit past release notes.

  • 403 - https://lnmarkets.substack.com/p/51-ryan-gentry-on-taro-massive-stress in the file the-lightning-network/taproot-assets/README.md:66 I don't know why that would register as a 403.

  • 404 - https://github.com/btcsuite/btcd/releases/tag/v0.23.5 in the file docs/lnd/INSTALL.md:358 what version is required now at a minimum? Can change this to 24.0 or remove the link

  • 400 - https://lh3.googleusercontent.com/RlxBjz3zHt5ED5JltlA7FJc2dIrIlrfbYrBQv1KR6Fgf2ZchbOvF7NlywsDY4Ck8o7ABPZDj7K3g25tNp0QhH18xGqoQg5yBF4hUoxADEjWOiKu9aSF8Ty1fTOTFiweL0OFFBcMDJrKxtf3PgW/_CQDg in the file lapps/guides/make-your-own-lnc-powered-application.md:42 this is an embedded gif, but it shows nicely

Liongrass avatar Sep 18 '24 15:09 Liongrass

@Liongrass the https://lnmarkets.substack.com/p/51-ryan-gentry-on-taro-massive-stress link registers as a 403 so it's probably due to the checker being IP blocklisted

djkazic avatar Sep 18 '24 16:09 djkazic

403 - https://lnmarkets.substack.com/p/51-ryan-gentry-on-taro-massive-stress in the file the-lightning-network/taproot-assets/README.md:66 I don't know why that would register as a 403.

Local check yields 200 code

curl --write-out '%{http_code}' --silent --output /dev/null  https://lnmarkets.substack.com/p/51-ryan-gentry-on-taro-massive-stress

dstadulis avatar Sep 18 '24 16:09 dstadulis

400 - https://lh3.googleusercontent.com/RlxBjz3zHt5ED5JltlA7FJc2dIrIlrfbYrBQv1KR6Fgf2ZchbOvF7NlywsDY4Ck8o7ABPZDj7K3g25tNp0QhH18xGqoQg5yBF4hUoxADEjWOiKu9aSF8Ty1fTOTFiweL0OFFBcMDJrKxtf3PgW/_CQDg in the file lapps/guides/make-your-own-lnc-powered-application.md:42 this is an embedded gif, but it shows nicely

If the gif's purpose is to show the demo file structure, let's replace the gif (small size = poor readability, unclear purpose in context, tenuous file hosting) with a tree output

$ tree src/components src/pages
src/components
├── MakeMeme.tsx
└── Page.tsx
src/pages
└── Home.tsx

dstadulis avatar Sep 18 '24 17:09 dstadulis