Doctave / doctave

A batteries-included developer documentation site generator
https://cli.doctave.com
MIT License
566 stars 32 forks source link

Broken link checking #28

Closed begleynk closed 2 years ago

begleynk commented 2 years ago

Closes #13

This feature adds broken links checking into the serve and build processes. It actually already uncovered a couple broken links we had in our own docs!

If there are broken internal links, the build process will return an error. Users can opt out of these errors by using the --allow-failed-checks flag. This keeps the option open to adding futher checks in the future if we want.

This change also includes a decent refactoring of how Doctave actually generates sites. Now each command interacts with a Site struct that is generic over a backend implementation (disk or in-memory). The Site is responsible of loading docs from disk, and then passing them to the backend once the HTML has been generated.