Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionclosed: duplicateThis issue or pull request already exists in another issue or pull requestdomain: markdownRelated to Markdown parsing or syntax
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
with docusaurus 3.0.0 a url is broken if the first url has a anchor ([a](./file.md#anchor)) and the second url uses the same url, but is in parenthesis (([b](./file.md#anchor])), fuller example:
[a](./migration/migrate-6.md#hooks) ([b](./migration/migrate-6.md#hooks))this does not occur if no parenthesis are used:
[a](./migration/migrate-6.md#hooks) [b](./migration/migrate-6.md#hooks)or if the first url does not have a anchor:
[a](./migration/migrate-6.md) ([b](./migration/migrate-6.md#hooks))PS: removing (or changing) the "id:" in the target file does not change the error
Reproducible demo
Steps to reproduce
- clone the repo (and checkout the the branch
docusuaursV3urlError) - cd into
website/ - run
yarn install - run
yarn run build - observe 2 errors:
- once for
/typegoose/docs/guides/advanced/reference-other-classes- which is the original case where i first saw the error - once for
/typegoose/docs/guides/error-warning-details- which is a reproduction of the issue
Expected behavior
the url to successfully compile with a correct link like in 2.4.3
Actual behavior
Broken link at runtime, and on build a broken link error:
Error: Unable to build website for locale en.
at tryToBuildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:55:19)
at mapAsyncSequential (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/utils/src/jsUtils.ts:45:20)
at async Command.build (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:82:21) {
[cause]: Error: Docusaurus found broken links!
Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.
Exhaustive list of all broken links found:
- On source page path = /typegoose/docs/guides/advanced/reference-other-classes:
-> linking to ../../api/functions/typeguards/isDocument.md#isdocumentarray (resolved as: /typegoose/docs/api/functions/typeguards/isDocument.md)
- On source page path = /typegoose/docs/guides/error-warning-details:
-> linking to ./migration/migrate-6.md#hooks (resolved as: /typegoose/docs/guides/migration/migrate-6.md)
at throwError (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/logger/src/index.ts:135:9)
at handleBrokenLinks (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:153:47)
at async buildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:192:5)
at async tryToBuildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:46:20)
at mapAsyncSequential (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/utils/src/jsUtils.ts:45:20)
at async Command.build (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:82:21)
}
[INFO] Docusaurus version: 3.0.0
Node version: v21.1.0
Your environment
- Public source code: https://github.com/typegoose/typegoose/tree/docusuaursV3urlError
- Public site URL: (build error, so not site with it up, but the 2.4.3 (or somewhat older):) https://typegoose.github.io/typegoose/
- Docusaurus version used: 3.0.0
- Environment name and version (e.g. Chrome 89, Node.js 16.4): nodejs 21.1.0
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Manjaro Linux 23.1.0
Self-service
- I'd be willing to fix this bug myself.
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionclosed: duplicateThis issue or pull request already exists in another issue or pull requestdomain: markdownRelated to Markdown parsing or syntax
Activity
Josh-Cena commentedon Nov 15, 2023
I think this is a duplicate of #9518. We'll make sure we fix both. Thanks for the detailed investigation!
slorber commentedon Apr 25, 2024
The issue to track for resolution of this bug is now #9048