Skip to content
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

Show a warning message when links are broken #1111

Closed
gianlucadonato opened this issue Nov 13, 2018 · 3 comments · Fixed by #1116
Closed

Show a warning message when links are broken #1111

gianlucadonato opened this issue Nov 13, 2018 · 3 comments · Fixed by #1116

Comments

@gianlucadonato
Copy link
Contributor

🚀 Feature

Show a warning message in the console (maybe flaggable in the options) that outputs a log when a link inside the documentation is broken.

Have you read the Contributing Guidelines on issues?

Yes.

Motivation

It can happen to have brokens links in the documentation that are caused by a change in the file id/path (e.g. a file is renamed, moved or simply there's a typo in the link) and then forgetting to update the link that points to it.
It's a pain discovering where they are in the docs and fix it.

Pitch

It would be nice to introduce a check when running docusaurus start or docusaurus build that shows a warning message if a link in the markdown has an unresolved path.

@manojbadam
Copy link

@gianlucadonato @endiliey - we want to make use of this functionality in our CI tests, before publishing the website we want to fail the CI tests if there are any broken links and not publish. Any tips to achieve that?, parsing logs is one option, is there any better approach ?

@renatovieiradesouza
Copy link

@gianlucadonato @endiliey - queremos usar essa funcionalidade em nossos testes de IC, antes de publicar o site, queremos reprovar nos testes de CI se houver links quebrados e não publicar. Alguma dica para conseguir isso ?, analisar os logs é uma opção, existe uma abordagem melhor?

you can use bcl for this, install by npm. https://www.npmjs.com/package/broken-link-checker

@prestonvanloon
Copy link

We would also like this to be part of our CI. I am not sure how bcl is relevant for a presubmit check since it seems to require a live site to function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants