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

fix(v2): brokenLinks should not report links that belong to an existing folder if folder/index.html exists #3308

Merged
merged 2 commits into from
Aug 19, 2020

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Aug 19, 2020

Motivation

#3303

Let's consider the static folder:

image

We should be able to link to the /javadoc, and despite not being an SPA link, it should not be reported as a broken link.

Test Plan

Unit tests + test on Docusaurus website

[javadoc](/javadoc)

[javadoc](/javadoc/)

[javadoc](/javadoc/index)

[javadoc](/javadoc/index.html)

[javadoc](/javadoc/hey)

[javadoc](/javadoc/hey.html)

[javadoc](/javadoc/bad)

[javadoc](/bad)

[javadoc](/bad/)

Lead to the expected result:

image

And we don't report anymore the good javadoc paths

@slorber slorber requested a review from yangshun as a code owner August 19, 2020 16:21
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 19, 2020
@slorber slorber added pr: bug fix This PR fixes a bug in a past release. and removed CLA Signed Signed Facebook CLA labels Aug 19, 2020
@slorber slorber linked an issue Aug 19, 2020 that may be closed by this pull request
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit d86e423

https://deploy-preview-3308--docusaurus-2.netlify.app

@slorber slorber merged commit f4ca61b into master Aug 19, 2020
@yangshun yangshun deleted the slorber/broken-links-handle-dir branch August 26, 2020 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Links validation failures after updating to 2.0.0-alpha.61
3 participants