-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its execution
Description
Edit from @slorber: the bug/repro is about a static/my-route/index.html resource and navbar item linking to it with a target:
{
href: '/my-route',
label: 'My Route',
prependBaseUrlToHref: true,
target: '_blank',
position: 'left',
},Links with a target: "_blank" should not be checked because they are unlikely to be internal SPA links.
Description
After upgrading from 3.0.1 to 3.1.0, the onBrokenLinks feature throw exception on static routes while it was not the case before.
Reproducible demo
Here is a fork of the repro project but using 3.0.1 without errors: https://stackblitz.com/edit/github-fausgf-qpa5vb
Steps to reproduce
- Create a new Docusaurus project
- Create a simple
index.htmlfile inside a subfolder instaticdirectory - In the Docusaurus config, add a NavBar item to link to this static html page
- Try to do a production build using
npm run build - Observe thrown errors during server compilation
Expected behavior
Does not throw errors for static page links (like in 3.0.1)
Actual behavior
Throw errors for static page links
Your environment
- Public source code: None
- Public site URL: None
- Docusaurus version used:3.1.0
- Environment name and version:Node 18.17
- Operating system and version:MacOS 14.2.1 and Unbuntu 22.01
Self-service
- I'd be willing to fix this bug myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its execution