Optionally make build fail if there are bad links
Feature request
Make vuepress build fail if any link found in the markdown files is pointing in the wrong direction. Checking external URLs would be painful, so my suggestion is we would only check links pointing to other pages in the same vuepress instance (I've noticed that there is already a link checker in place for when you run vuepress dev).
What problem does this feature solve?
This would prevent people from accidentally introducing dead links into their docs.
What does the proposed API look like?
It should probably be opt-in (at least to start with), so perhaps something like vuepress build --validate-links
How should this be implemented in your opinion?
Are you willing to work on this yourself?**
Sure. Some pointers would be appreciated.
Actually VuePress has wrong-link check, so could you provide a reproduction repo?
Hello @ulivz This feature seems to be down since v1.0.0-alpha*. I've just ran a build with an intentionally broken link inside a page and the whole process just went fine. The whole thing got built with the broken link inside the page.
I've set up a reproduction repository here https://github.com/kuzzleio/documentation/tree/broken-link-test
You can access the page with the broken link here https://github.com/kuzzleio/documentation/blob/broken-link-test/src/core/1/guide/guides/getting-started/first-steps/index.md
In addition to this, we made a broken link checker that made this build fail https://travis-ci.org/kuzzleio/documentation/jobs/551834013
@ulivz I guess this can be considered a valid reproduction repo so it would be appropriate to take the "need reproduction repo" label out.
I believe this issue still exists in the latest 2.x...