Skip to content

[lexical-website] Bug Fix: Include packages/ in API docs GitHub source links - #9204

Merged
etrepum merged 2 commits into
meta:mainfrom
etrepum:claude/api-docs-github-links-p7xxz0
Sep 23, 2026
Merged

etrepum merged 2 commits into
meta:mainfrom
etrepum:claude/api-docs-github-links-p7xxz0

Conversation

@etrepum

@etrepum etrepum commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

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.

…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]>
@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lexical Ready Ready Preview Sep 23, 2026 2:29pm UTC
lexical-playground Ready Ready Preview Sep 23, 2026 2:29pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 23, 2026
@etrepum
etrepum marked this pull request as ready for review September 23, 2026 14:27
@etrepum
etrepum added this pull request to the merge queue Sep 23, 2026
Merged via the queue into meta:main with commit cc90945 Sep 23, 2026
42 checks passed
@etrepum etrepum mentioned this pull request Sep 28, 2026

This branch was successfully deployed

2 active deployments
Preview – lexical — 552eaccb Deployed Sep 23, 2026 by vercel[bot]
Preview – lexical-playground — 552eaccb Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants