Have you read the Contributing Guidelines on issues?
Prerequisites
Description
Docusaurus checks for broken links inside tilde code blocks when onBrokenMarkdownLinks is set to throw
Reproducible demo
No response
Steps to reproduce
- create a new docusaurus site using
create-docusaurus
- make sure that docusaurus.config.js contains
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
- Add following content to
docs/intro.md
```
this is an [invalid link](./path/to/a/page/that/does/not/exist.md)
```
- run
npx docusaurus build to see the site build as expected
- change the codeblock from step 3 to use ~ instead of ` ie
~~~
this is an [invalid link](./path/to/a/page/that/does/not/exist.md)
~~~
- run
npx docusaurus build to see the build fail with an error
Error: Docs markdown link couldn't be resolved: (./path/to/a/page/that/does/not/exist.md) in
"/Users/foo/bar/baz/docusaurus/packages/testsite/docs/intro.md" for version current
at Array.forEach (<anonymous>)
Expected behavior
Docusaurus either does not check links inside codeblock or checks them for both backtick and tilde codeblocks when onBrokenMarkdownLinks is set to throw
Actual behavior
Docusaurus errors for broken markdown links only inside tilde codeblocks when onBrokenMarkdownLinks is set to throw
Your environment
- Public source code: NA
- Public site URL: NA
- Docusaurus version used: Can reproduce with 2.0.0-beta.21 and 2.0.0-rc.1
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js 16.4
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Macos
Self-service
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
Docusaurus checks for broken links inside tilde code blocks when
onBrokenMarkdownLinksis set tothrowReproducible demo
No response
Steps to reproduce
create-docusaurusdocs/intro.mdnpx docusaurus buildto see the site build as expectednpx docusaurus buildto see the build fail with an errorExpected behavior
Docusaurus either does not check links inside codeblock or checks them for both backtick and tilde codeblocks when
onBrokenMarkdownLinksis set tothrowActual behavior
Docusaurus errors for broken markdown links only inside tilde codeblocks when
onBrokenMarkdownLinksis set tothrowYour environment
Self-service