keptn-sandbox / new-keptn-docs-engine

GSoC 2022 Project: New Documentation Site Engine
https://keptn-experimental-docs-site.netlify.app/
Apache License 2.0
6 stars 2 forks source link

Add broken link checker #27

Open iamrajiv opened 2 years ago

iamrajiv commented 2 years ago

Problem statement

In every documentation site, there is a chance of having broken links inside the docs or xrefs to other docs. This is a problem because it can lead to a bad user experience. Going through the entire repository to fix all the links at once is hard and time-consuming. This is where the broken link checker comes in. It is a tool that can be used to find all the broken links in the documentation and fix them.

Describe the solution you'd like

A GitHub Action that can be run on the docs to check for broken links and xrefs. The GitHub Action should be able to create an issue on the repository with the broken links report, add labels to the issue and assign it to the relevant maintainers.

Additional context

Running a link check on each PR is a great idea in theory, but occasionally creates a bad developer experience because the link check fails for newly created pages. Propose that instead, we can run link checks on the latest branch. All links on the latest branch should always resolve, as that is the production branch. If a broken link is detected, an issue is created. This has the added benefit of detecting links that break passively when the target page is moved.