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
docs(links): update README to reflect current link checkers
The rendered-content-link-checker.ts script and its rendered-content-link-checker-cli
npm command were removed when the link-checking system was rebuilt, but
src/links/README.md still documented them, including obsolete options
(--level, --check-external-links).
Replace them with the current checkers (check-links-pr, check-links-internal,
check-links-external), document their options, add the components/ path to the
LinkPreviewPopover.tsx reference, and update the stale performance note.
Signed-off-by: MeGaurav4 <gaurav3.141592@gmail.com>
Copy file name to clipboardExpand all lines: src/links/README.md
+11-13Lines changed: 11 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The `src/links` directory manages:
14
14
15
15
### Components
16
16
17
-
-**`LinkPreviewPopover.tsx`**: A React component that renders a preview card when a user hovers over a link. It handles:
17
+
-**`components/LinkPreviewPopover.tsx`**: A React component that renders a preview card when a user hovers over a link. It handles:
18
18
-**Delay Logic**: Prevents the popover from appearing during accidental mouse-overs.
19
19
-**Positioning**: Ensures the popover appears near the link without going off-screen.
20
20
@@ -28,12 +28,9 @@ The `src/links` directory manages:
28
28
29
29
### Scripts (`src/links/scripts`)
30
30
31
-
-**`rendered-content-link-checker.ts`**: A comprehensive CLI tool that:
32
-
- Renders content pages to HTML.
33
-
- Parses the HTML to find all `<a>` and `<img>` tags.
34
-
- Validates internal links (checking for 404s, broken anchors).
35
-
- Validates external links (with caching and retry logic).
36
-
- Reports flaws and can comment directly on GitHub Pull Requests.
31
+
-**`check-links-pr.ts`**: Fast validation of internal links in the files changed by a pull request. Runs in under 10 minutes on typical PRs and can post flaws directly on the PR.
32
+
-**`check-links-internal.ts`**: Comprehensive check of all internal links across all versions and languages. Designed to run as a scheduled workflow (twice weekly).
33
+
-**`check-links-external.ts`**: Validates external URLs in content files. Designed to run weekly with aggressive caching.
37
34
-**`check-github-github-links.ts`**: Ensures that we don't accidentally link to private `github/github` URLs in public documentation.
38
35
-**`update-internal-links.ts`**: A CLI wrapper around the library function to perform bulk updates on the content files.
39
36
@@ -44,13 +41,14 @@ The `src/links` directory manages:
44
41
To run the link checker locally:
45
42
46
43
```bash
47
-
npm run rendered-content-link-checker-cli
44
+
npm run check-links-pr
45
+
npm run check-links-internal
46
+
npm run check-links-external
48
47
```
49
48
50
-
Options:
51
-
-`--level <all|critical|warning>`: Set the reporting level.
-`check-links-pr` validates internal links in the changed files of a pull request (optionally limited with `--files <paths>`).
50
+
-`check-links-internal` checks all internal links across all versions and languages (optionally scoped with `--version <version>` and `--language <language>`).
51
+
-`check-links-external` validates external URLs in content files (optionally limited with `--max <count>`).
54
52
55
53
### Updating Links
56
54
@@ -74,6 +72,6 @@ This script typically relies on the state of the `content` directory to determin
74
72
75
73
## Current State & Known Issues
76
74
77
-
-**Performance**: The `rendered-content-link-checker` is resource-intensive because it renders pages. It uses concurrency limits and caching (especially for external links) to mitigate this.
75
+
-**Performance**: The internal linkchecker is resource-intensive because it renders pages across all versions and languages. It uses concurrency limits and caching (especially for external links) to mitigate this.
78
76
-**False Positives**: External link checking can be flaky due to temporary network issues or anti-bot protections on target sites. The system uses a "retry and cache" strategy to reduce noise.
79
77
-**Liquid Complexity**: `update-internal-links` has to use regex and heuristics to parse Markdown mixed with Liquid, which is inherently fragile compared to a full AST parser, but necessary to preserve code formatting.
0 commit comments