You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generating broken links for certain symbol combinations in markdown files #9518
Cross-linking #9553: please add the following to the tests too:
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:
I have confirmed that there are still broken links being generated after the release of v3.0.1. In that regard, there is no effectual change in behavior.
Just retested with 3.2.0, and i can still reproduce the issue there (at least with the ways i had lined out in #9553 / reproduction repository)
updated error:
[ERROR] Error: Unable to build website for locale en.
at tryToBuildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:53:19)
at async /mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:64:9
at mapAsyncSequential (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/utils/src/jsUtils.ts:21:20)
at async Command.build (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:62:5) {
[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:
- Broken link 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#isdocumentarray)
- Broken link 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#hooks)
at throwError (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/logger/src/index.ts:135:9)
at reportBrokenLinks (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:242:47)
at handleBrokenLinks (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:274:5)
at executeBrokenLinksCheck (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:182:47)
at /mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:136:66
at Object.async (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/utils.js:36:47)
at buildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:136:30)
at async tryToBuildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:46:13)
at async /mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:64:9
at mapAsyncSequential (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/utils/src/jsUtils.ts:21:20)
}
[INFO] Docusaurus version: 3.2.0
Node version: v21.6.2
Activity
ruchikamuddinagiri commentedon Nov 10, 2023
Hi, can I work on this?
Josh-Cena commentedon Nov 15, 2023
Cross-linking #9553: please add the following to the tests too:
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:this does not occur if no parenthesis are used:
or if the first url does not have a anchor:
PS: removing (or changing) the "id:" in the target file does not change the error
Reproducible demo
https://github.com/typegoose/typegoose/tree/docusuaursV3urlError
jellyfith commentedon Dec 11, 2023
I have confirmed that there are still broken links being generated after the release of v3.0.1. In that regard, there is no effectual change in behavior.
monica-m-ps commentedon Dec 31, 2023
I also get the same broken links error when trying to upgrade..
This works well in the previous version. I have a long list of these errors. Pasted just these as references.
My current format is
fix(docs): Work around docusaurus bug causing broken links
fredrik-jansson-se commentedon Jan 18, 2024
I've noticed the following markdown also generates broken links, i.e. with a newline:
Generates the following error:
Works well.
This used to work in v2, but not in v3.1.0
fix(docs): Work around docusaurus bug causing broken links
fix(docs): Work around docusaurus bug causing broken links
F-OBrien commentedon Mar 1, 2024
I just updated to v3 and now have issues with many links generated by typdoc. The broken link pattern is similar to that reported by @bo-carey.
in the below Link2 and Link3 are both broken
It seems I need at least 1 space anywhere between broken links to fix the issue. e.g.
For my case if I do a find and replace
)\<[with) \<[to add a space between links then the links in the generated types are fixed.hasezoey commentedon Apr 2, 2024
Just retested with 3.2.0, and i can still reproduce the issue there (at least with the ways i had lined out in #9553 / reproduction repository)
updated error:
[ERROR] Error: Unable to build website for locale en. at tryToBuildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:53:19) at async /mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:64:9 at mapAsyncSequential (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/utils/src/jsUtils.ts:21:20) at async Command.build (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:62:5) { [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: - Broken link 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#isdocumentarray) - Broken link 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#hooks) at throwError (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/logger/src/index.ts:135:9) at reportBrokenLinks (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:242:47) at handleBrokenLinks (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:274:5) at executeBrokenLinksCheck (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:182:47) at /mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:136:66 at Object.async (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/utils.js:36:47) at buildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:136:30) at async tryToBuildLocale (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:46:13) at async /mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/core/lib/commands/build.js:64:9 at mapAsyncSequential (/mnt/projects/nodejs/typegoose/website/node_modules/@docusaurus/utils/src/jsUtils.ts:21:20) } [INFO] Docusaurus version: 3.2.0 Node version: v21.6.2slorber commentedon Apr 25, 2024
Going to close as a duplicate of #9048 because this is the real issue that we need to fix to resolve that bug properly.
fix(docs): Work around docusaurus bug causing broken links
fix(docs): Work around docusaurus bug causing broken links
fix(docs): Work around docusaurus bug causing broken links
fix(docs): Work around docusaurus bug causing broken links