-
Notifications
You must be signed in to change notification settings - Fork 126
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
chore: Add script to identify broken links #186
Conversation
* Find all Markdown files in the project * Extract all Markdown-style links and plain URLs * Create unique list of simplified URLs * Use local files to check relative links, use cached HTTP requests for links outside project * Run HTTP requests in parallel * Retry GitHub rate-limited URLs after one minute * Report broken links with source file and line number Signed-off-by: Christian Kadner <[email protected]>
Signed-off-by: Christian Kadner <[email protected]>
✅ Deploy Preview for elastic-nobel-0aef7a ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Signed-off-by: Christian Kadner <[email protected]>
Signed-off-by: Christian Kadner <[email protected]>
/cc @yuzisun |
Thanks @ckadner !! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ckadner, yuzisun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* chore: Add script to verify Markdown links * Find all Markdown files in the project * Extract all Markdown-style links and plain URLs * Create unique list of simplified URLs * Use local files to check relative links, use cached HTTP requests for links outside project * Run HTTP requests in parallel * Retry GitHub rate-limited URLs after one minute * Report broken links with source file and line number Signed-off-by: Christian Kadner <[email protected]> * Fix broken links Signed-off-by: Christian Kadner <[email protected]> * Refine URL exclusion patterns Signed-off-by: Christian Kadner <[email protected]> * Fix more broken links Signed-off-by: Christian Kadner <[email protected]> Signed-off-by: Christian Kadner <[email protected]> Signed-off-by: rachitchauhan43 <[email protected]>
Motivation
Broken links in documentation are making it harder for new comers to learn about KServe and often it is not easy to find what the correct link should be. For project maintainers it is time consuming to revisit documentation to identify broken links manually. It certainly does not make the best impression on new comers if they click on links that return
404
errors.Proposed Changes
Add new script
docs/hack/verify-doc-links.py
to identify 93 broken links of the currently 1291 links (581 unique URLs) in 153 Markdown files.I made a "best-effort" attempt to fix as many the broken links identified by the new script. 11 broken links are remaining. I might need some help from the KServe community to address the remaining ones.
Example
How does the script work
Script pedigree: I contributed several iteration of this script to MLX and KFP-Tekton projects, and most recently to ModelMesh. This latest one differs from earlier version in that it does not require any non-standard libraries like for Markdown or
requests
to be installed into a virtual environment prior to running the script.Possible future enhancements
Add a new PR check to run the
docs/hack/verify-doc-links.py
script with any PR to identify broken links as soon as possible and hopefully have the PR contributor fix the broken link, even if outside the scope of the PR./cc @njhill