Repository navigation
[lexical-website] Bug Fix: Include packages/ in API docs GitHub source links - #9204
Merged
Merged
Conversation
…e links ## Description The "Defined in" source links in the generated API docs pointed at `https://github.com/facebook/lexical/tree/main/lexical/src/...`, missing the `packages/` directory, so they 404'd. With `disableGit: true`, TypeDoc computes `{path}` relative to the common directory of the entry points (`packages/`), not the repository root. This adds the `packages/` prefix to `sourceLinkTemplate`. Setting `displayBasePath` to the repo root was considered but rejected because it also changes the generated module names and page paths. ## Test plan ### Before `npx docusaurus generate-typedoc`, then counting link prefixes in docs/api: ``` 2883 https://github.com/facebook/lexical/tree/main/lexical/src/ 238 https://github.com/facebook/lexical/tree/main/lexical-react/src/ 237 https://github.com/facebook/lexical/tree/main/lexical-table/src/ ``` ### After ``` 2883 https://github.com/facebook/lexical/tree/main/packages/lexical/ 238 https://github.com/facebook/lexical/tree/main/packages/lexical-react/ 237 https://github.com/facebook/lexical/tree/main/packages/lexical-table/ ``` The generated file tree is identical to before, and `diff -r` shows no changed lines other than the source links. About 77 links to types that come from `node_modules` (e.g. `@types/mdast`) were already broken and are still broken. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
marked this pull request as ready for review
September 23, 2026 14:27
etrepum
requested review from
acywatson,
fantactuka,
ivailop7,
potatowagon and
zurfyx
as code owners
September 23, 2026 14:27
zurfyx
approved these changes
Sep 23, 2026
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The "Defined in" source links in the generated API docs pointed at
https://github.com/facebook/lexical/tree/main/lexical/src/..., missing thepackages/directory, so they 404'd. WithdisableGit: true, TypeDoc computes{path}relative to the common directory of the entry points (packages/), not the repository root.This adds the
packages/prefix tosourceLinkTemplate. SettingdisplayBasePathto the repo root was considered but rejected because it also changes the generated module names and page paths.Test plan
Before
npx docusaurus generate-typedoc, then counting link prefixes in docs/api:After
The generated file tree is identical to before, and
diff -rshows no changed lines other than the source links. About 77 links to types that come fromnode_modules(e.g.@types/mdast) were already broken and are still broken.