Skip to content

feat: add PR link checking workflow and fix links#2192

Merged
bjohansebas merged 52 commits intoredesignfrom
link-check
Mar 15, 2026
Merged

feat: add PR link checking workflow and fix links#2192
bjohansebas merged 52 commits intoredesignfrom
link-check

Conversation

@bjohansebas
Copy link
Member

@bjohansebas bjohansebas commented Feb 21, 2026

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

@bjohansebas bjohansebas requested a review from a team as a code owner February 21, 2026 23:16
@netlify
Copy link

netlify bot commented Feb 21, 2026

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 77d2f45
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/69b719c81f32c50008c6dace
😎 Deploy Preview https://deploy-preview-2192--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 4 from production)
Accessibility: 100 (🟢 up 13 from production)
Best Practices: 100 (no change from production)
SEO: 100 (🟢 up 6 from production)
PWA: 80 (🟢 up 50 from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@socket-security
Copy link

socket-security bot commented Mar 12, 2026

@bjohansebas bjohansebas changed the title feat: add PR link checking workflow feat: add PR link checking workflow and fix links Mar 13, 2026
@bjohansebas bjohansebas requested a review from Copilot March 15, 2026 20:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +2 to +6
title: 4x API Reference
description: API Reference for version 4.x
---

# 4.x API
Comment on lines +1 to +6
---
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']),
Comment on lines +79 to +82
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@bjohansebas
Copy link
Member Author

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 docs collection where everything was versioned and had i18n. Instead, the API is now only in the API collection, with no i18n.

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.

@bjohansebas bjohansebas merged commit 5e8ed6a into redesign Mar 15, 2026
12 checks passed
@bjohansebas bjohansebas deleted the link-check branch March 15, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants