feat: add PR link checking workflow and fix links#2192
feat: add PR link checking workflow and fix links#2192bjohansebas merged 52 commits intoredesignfrom
Conversation
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
7871870 to
df85434
Compare
df85434 to
8e1ce67
Compare
fb64e0c to
5c679fa
Compare
…into link-check
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…into link-check
There was a problem hiding this comment.
Pull request overview
Adds automated link checking via Lychee and updates many internal/external documentation links to match the new route structure, while also introducing an api content collection for Astro.
Changes:
- Add a GitHub Actions job to build the Astro site and run Lychee link checks.
- Normalize many docs/blog/API links (e.g., removing
.html, switching to/en/...paths, updating anchors, switching to HTTPS). - Add an Astro content collection for API docs and scaffold new API index/overview pages.
Reviewed changes
Copilot reviewed 94 out of 831 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| astro/src/content/docs/de/4x/api/application/app-use.md | Removes German 4x app API doc page. |
| astro/src/content/docs/de/4x/api/application/app-set.md | Removes German 4x app API doc page. |
| astro/src/content/docs/de/4x/api/application/app-onmount.md | Removes German 4x app API doc page. |
| astro/src/content/docs/de/4x/api/application/app-get.md | Removes German 4x app API doc page. |
| astro/src/content/docs/de/4x/api/application/app-get-method.md | Removes German 4x app API doc page. |
| astro/src/content/docs/de/4x/api/application/app-disabled.md | Removes German 4x app API doc page. |
| astro/src/content/docs/de/4x/api/application/app-disable.md | Removes German 4x app API doc page. |
| astro/src/content/docs/de/4x/api/application/app-delete-method.md | Removes German 4x app API doc page. |
| astro/src/content/docs/de/4x/advanced/security-updates.md | Fixes absolute links to stable /en/... routes. |
| astro/src/content/docs/de/4x/advanced/best-practice-security.md | Updates links + section anchor references and one external URL. |
| astro/src/content/docs/de/4x/advanced/best-practice-performance.md | Updates several external links/anchors. |
| astro/src/content/docs/de/3x/api.md | Fixes /support link URL. |
| astro/src/content/blog/en/write-post.md | Adds author guide page for writing blog posts. |
| astro/src/content/blog/en/2025-03-31-v5-1-latest-release.md | Replaces absolute URLs with internal routes. |
| astro/src/content/blog/en/2025-01-09-rewind-2024-triumphs-and-2025-vision.md | Replaces absolute URLs with internal routes. |
| astro/src/content/blog/en/2024-10-22-security-audit-milestone-achievement.md | Replaces absolute URL with internal route. |
| astro/src/content/blog/en/2024-10-15-v5-release.md | Adds TOC items + normalizes internal links/anchors. |
| astro/src/content/blog/en/2024-07-16-welcome-post.md | Fixes internal link route for write-post. |
| astro/src/content/api/5x/api/response/res-status.md | Switches Node docs link to HTTPS. |
| astro/src/content/api/5x/api/response/res-render.md | Updates template-engine guide link to /en/... route. |
| astro/src/content/api/5x/api/response/res-redirect.md | Fixes RFC anchor + security link anchor format. |
| astro/src/content/api/5x/api/response/res-jsonp.md | Replaces in-page anchor with absolute app-settings link. |
| astro/src/content/api/5x/api/request/req-subdomains.md | Updates app.set link to /en/5x/api#.... |
| astro/src/content/api/5x/api/request/req-query.md | Replaces #app.settings.table anchors with app-settings page links. |
| astro/src/content/api/5x/api/request/req-path.md | Updates app.use link to /en/5x/api#.... |
| astro/src/content/api/5x/api/request/req-params.md | Updates routing/app.param links to /en/... routes. |
| astro/src/content/api/5x/api/request/req-ips.md | Updates trust proxy link to /en/5x/api#.... |
| astro/src/content/api/5x/api/request/req-ip.md | Updates trust proxy link to /en/5x/api#.... |
| astro/src/content/api/5x/api/request/req-hostname.md | Updates trust proxy link to /en/5x/api#.... |
| astro/src/content/api/5x/api/request/req-host.md | Fixes broken relative link to trust proxy setting. |
| astro/src/content/api/5x/api/express/express.urlencoded.md | Updates middleware doc link to /en/... route. |
| astro/src/content/api/5x/api/express/express.text.md | Updates middleware doc link to /en/... route. |
| astro/src/content/api/5x/api/express/express.static.md | Updates middleware/perf links to /en/... routes. |
| astro/src/content/api/5x/api/express/express.raw.md | Updates middleware doc link to /en/... route. |
| astro/src/content/api/5x/api/express/express.json.md | Updates middleware doc link to /en/... route. |
| astro/src/content/api/5x/api/application/overview.md | Points “Application settings” to app-settings page. |
| astro/src/content/api/5x/api/application/app-use.md | Normalizes several guide/app-settings links. |
| astro/src/content/api/5x/api/application/app-settings.md | Updates perf/behind-proxies links to /en/... routes. |
| astro/src/content/api/5x/api/application/app-set.md | Links app settings table to app-settings page. |
| astro/src/content/api/5x/api/application/app-post-method.md | Normalizes routing guide link. |
| astro/src/content/api/5x/api/application/app-param.md | Normalizes routing guide anchor link. |
| astro/src/content/api/5x/api/application/app-onmount.md | Updates “Application settings” link. |
| astro/src/content/api/5x/api/application/app-get.md | Links app settings table to app-settings page. |
| astro/src/content/api/5x/api/application/app-get-method.md | Normalizes routing guide link. |
| astro/src/content/api/5x/api/application/app-enabled.md | Links app settings table to app-settings page. |
| astro/src/content/api/5x/api/application/app-enable.md | Links app settings table to app-settings page. |
| astro/src/content/api/5x/api/application/app-disabled.md | Links app settings table to app-settings page. |
| astro/src/content/api/5x/api/application/app-disable.md | Links app settings table to app-settings page. |
| astro/src/content/api/5x/api/application/app-delete-method.md | Normalizes routing guide link. |
| astro/src/content/api/5x/api/application/app-METHOD.md | Normalizes routing guide link. |
| astro/src/content/api/5x/api.md | Adds (placeholder) top-level API page for 5x. |
| astro/src/content/api/4x/api/response/res-status.md | Switches Node docs link to HTTPS. |
| astro/src/content/api/4x/api/response/res-render.md | Updates template-engine guide link to /en/... route. |
| astro/src/content/api/4x/api/response/res-redirect.md | Fixes RFC anchor + security link anchor format. |
| astro/src/content/api/4x/api/response/res-location.md | Fixes security link anchor format. |
| astro/src/content/api/4x/api/response/res-jsonp.md | Replaces in-page anchor with absolute app-settings link. |
| astro/src/content/api/4x/api/request/req-subdomains.md | Updates app.set link to /en/4x/api#.... |
| astro/src/content/api/4x/api/request/req-query.md | Replaces #app.settings.table anchors with app-settings page links. |
| astro/src/content/api/4x/api/request/req-path.md | Updates app.use link to /en/4x/api#.... |
| astro/src/content/api/4x/api/request/req-params.md | Updates routing/app.param links to /en/... routes. |
| astro/src/content/api/4x/api/request/req-ips.md | Updates trust proxy link to /en/4x/api#.... |
| astro/src/content/api/4x/api/request/req-ip.md | Updates trust proxy link to /en/4x/api#.... |
| astro/src/content/api/4x/api/request/req-hostname.md | Updates trust proxy link to /en/4x/api#.... |
| astro/src/content/api/4x/api/express/express.urlencoded.md | Updates middleware doc link to /en/... route. |
| astro/src/content/api/4x/api/express/express.text.md | Updates middleware doc link to /en/... route. |
| astro/src/content/api/4x/api/express/express.static.md | Updates middleware/perf links to /en/... routes. |
| astro/src/content/api/4x/api/express/express.raw.md | Updates middleware doc link to /en/... route. |
| astro/src/content/api/4x/api/express/express.json.md | Updates middleware doc link to /en/... route. |
| astro/src/content/api/4x/api/application/overview.md | Points “Application settings” to app-settings page. |
| astro/src/content/api/4x/api/application/app-use.md | Normalizes several guide/app-settings links. |
| astro/src/content/api/4x/api/application/app-settings.md | Updates perf/behind-proxies links to /en/... routes. |
| astro/src/content/api/4x/api/application/app-set.md | Links app settings table to app-settings page. |
| astro/src/content/api/4x/api/application/app-post-method.md | Normalizes routing guide link. |
| astro/src/content/api/4x/api/application/app-param.md | Normalizes routing guide anchor link. |
| astro/src/content/api/4x/api/application/app-onmount.md | Updates “Application settings” link. |
| astro/src/content/api/4x/api/application/app-get.md | Links app settings table to app-settings page. |
| astro/src/content/api/4x/api/application/app-get-method.md | Normalizes routing guide link. |
| astro/src/content/api/4x/api/application/app-enabled.md | Links app settings table to app-settings page. |
| astro/src/content/api/4x/api/application/app-enable.md | Links app settings table to app-settings page. |
| astro/src/content/api/4x/api/application/app-disabled.md | Links app settings table to app-settings page. |
| astro/src/content/api/4x/api/application/app-disable.md | Links app settings table to app-settings page. |
| astro/src/content/api/4x/api/application/app-delete-method.md | Normalizes routing guide link. |
| astro/src/content/api/4x/api/application/app-METHOD.md | Normalizes routing guide link. |
| astro/src/content/api/4x/api.md | Adds (placeholder) top-level API page for 4x. |
| astro/src/content/api/3x/api/response/overview.md | Adds placeholder response overview page. |
| astro/src/content/api/3x/api.md | Adds top-level 3x API page with includes and EOL warning. |
| astro/src/content.config.ts | Adds api content collection. |
| astro/src/config/menu/middleware.ts | Removes connect-rid menu entry (likely broken link). |
| astro/package.json | Adds globals dependency (eslint globals config). |
| astro/eslint.config.js | Uses globals + globalIgnores for ESLint flat config. |
| astro/astro.config.mjs | Sets site dynamically for Netlify preview deployments. |
| astro/CONTRIBUTING.md | Updates contributing page URL format. |
| astro/.lycheeignore | Adds ignore rules to reduce rate limiting / false positives. |
| .github/workflows/build.yml | Adds linkChecker job using lychee-action. |
Comments suppressed due to low confidence (1)
astro/src/content/api/4x/api/response/res-jsonp.md:1
- This absolute link is missing the locale prefix (
/en/...) and (based on other updates) likely also needs the version segment (/4x/...or/5x/...). As written it’s likely to 404. Prefer linking to the correct versioned app-settings page under the same API version, and keep the locale consistent with surrounding links.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| title: 4x API Reference | ||
| description: API Reference for version 4.x | ||
| --- | ||
|
|
||
| # 4.x API |
| --- | ||
| title: API Response Overview | ||
| description: An overview of the API response object in Express.js, detailing its properties and methods for | ||
| --- | ||
|
|
||
| TODO |
| @@ -0,0 +1,25 @@ | |||
| --- | |||
| title: Express 3.x - Referencia de API | |||
|
|
||
| const site = NETLIFY_PREVIEW_SITE || 'https://expressjs.com'; | ||
|
|
||
| // TODO: add redirecto for blog posts |
|
|
||
| export default [ | ||
| // Global ignores | ||
| globalIgnores(['dist/*', '.astro/*', 'node_modules/*', 'package-lock.json']), |
| linkChecker: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 |
|
Okay @g-francesca and @expressjs/docs-wg, this is a pretty huge PR (something I wanted to avoid) and I'm going to merge it because I need it to unblock my next changes. The most important thing to keep in mind about these changes is that the API now has its own Astro collection. It is no longer tied to the I also added a fallback for pages that don't have a translation yet, pointing directly to the English version. This helps avoid a lot of 404s right now, since otherwise I wouldn't be able to keep moving forward. And honestly, I quite like the fallback :) I know there are links between API pages that point to the wrong version; that will be fixed in #2193. If you find any problems, feel free to open a PR to fix them or open an issue. |

After asking for some feedback on the Astro Discord about a link checker, they recommended https://github.com/lycheeverse/lychee for this task. They also recommended https://github.com/HiDeoo/starlight-links-validator, but it seems it only works with Starlight.
closes #1100