laminas-continuous-integration-action
laminas-continuous-integration-action copied to clipboard
Add automated link checker
Feature Request
Beside the Markdown linting it would be great if we can check all the links in the Markdown files.
| Q | A |
|---|---|
| New Feature | yes |
| BC Break | no |
Summary
A potential candidate would be markdown-link-check which can be installed via npm.
Related to https://github.com/laminas/documentation/issues/16
This tool doesn't support globbing, but I managed to run it out of docker with find with something like find ./docs/book -name \*.md -exec docker run -v ${PWD}:/tmp:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /tmp/{} \;
Because it's one file per run, there's no overall return and getting the output into GHA will be interesting.
Not sure how to proceed with this…
@gsteel Thank you for the testing. 👍🏻
Maybe this one: https://github.com/marketplace/actions/lychee-broken-link-checker
That's more like it. For i18n:
lychee docs/book -f json
{
"total": 62,
"successful": 61,
"failures": 1,
"unknown": 0,
"timeouts": 0,
"redirects": 0,
"excludes": 0,
"errors": 0,
"cached": 0,
"fail_map": {
"docs/book/view-helpers/plural.md": [
{
"url": "https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals",
"status": "Failed: Network error"
}
]
}
}
It's also a lot faster…
@gsteel Is this an option for us: https://github.com/marketplace/actions/lychee-broken-link-checker ?