Skip to content

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

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

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

Conversation

@bjohansebas

@bjohansebasbjohansebas commented Feb 21, 2026

Copy link
Copy Markdown
Member

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 ownerFebruary 21, 2026 23:16
@netlify

netlifyBot commented Feb 21, 2026

Copy link
Copy Markdown

Deploy Preview for expressjscom-preview ready!

NameLink
🔨 Latest commit77d2f45
🔍 Latest deploy loghttps://app.netlify.com/projects/expressjscom-preview/deploys/69b719c81f32c50008c6dace
😎 Deploy Previewhttps://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

socket-securityBot commented Mar 12, 2026

Copy link
Copy Markdown

@bjohansebasbjohansebas changed the title feat: add PR link checking workflowfeat: add PR link checking workflow and fix linksMar 13, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
FileDescription
astro/src/content/docs/de/4x/api/application/app-use.mdRemoves German 4x app API doc page.
astro/src/content/docs/de/4x/api/application/app-set.mdRemoves German 4x app API doc page.
astro/src/content/docs/de/4x/api/application/app-onmount.mdRemoves German 4x app API doc page.
astro/src/content/docs/de/4x/api/application/app-get.mdRemoves German 4x app API doc page.
astro/src/content/docs/de/4x/api/application/app-get-method.mdRemoves German 4x app API doc page.
astro/src/content/docs/de/4x/api/application/app-disabled.mdRemoves German 4x app API doc page.
astro/src/content/docs/de/4x/api/application/app-disable.mdRemoves German 4x app API doc page.
astro/src/content/docs/de/4x/api/application/app-delete-method.mdRemoves German 4x app API doc page.
astro/src/content/docs/de/4x/advanced/security-updates.mdFixes absolute links to stable /en/... routes.
astro/src/content/docs/de/4x/advanced/best-practice-security.mdUpdates links + section anchor references and one external URL.
astro/src/content/docs/de/4x/advanced/best-practice-performance.mdUpdates several external links/anchors.
astro/src/content/docs/de/3x/api.mdFixes /support link URL.
astro/src/content/blog/en/write-post.mdAdds author guide page for writing blog posts.
astro/src/content/blog/en/2025-03-31-v5-1-latest-release.mdReplaces absolute URLs with internal routes.
astro/src/content/blog/en/2025-01-09-rewind-2024-triumphs-and-2025-vision.mdReplaces absolute URLs with internal routes.
astro/src/content/blog/en/2024-10-22-security-audit-milestone-achievement.mdReplaces absolute URL with internal route.
astro/src/content/blog/en/2024-10-15-v5-release.mdAdds TOC items + normalizes internal links/anchors.
astro/src/content/blog/en/2024-07-16-welcome-post.mdFixes internal link route for write-post.
astro/src/content/api/5x/api/response/res-status.mdSwitches Node docs link to HTTPS.
astro/src/content/api/5x/api/response/res-render.mdUpdates template-engine guide link to /en/... route.
astro/src/content/api/5x/api/response/res-redirect.mdFixes RFC anchor + security link anchor format.
astro/src/content/api/5x/api/response/res-jsonp.mdReplaces in-page anchor with absolute app-settings link.
astro/src/content/api/5x/api/request/req-subdomains.mdUpdates app.set link to /en/5x/api#....
astro/src/content/api/5x/api/request/req-query.mdReplaces #app.settings.table anchors with app-settings page links.
astro/src/content/api/5x/api/request/req-path.mdUpdates app.use link to /en/5x/api#....
astro/src/content/api/5x/api/request/req-params.mdUpdates routing/app.param links to /en/... routes.
astro/src/content/api/5x/api/request/req-ips.mdUpdates trust proxy link to /en/5x/api#....
astro/src/content/api/5x/api/request/req-ip.mdUpdates trust proxy link to /en/5x/api#....
astro/src/content/api/5x/api/request/req-hostname.mdUpdates trust proxy link to /en/5x/api#....
astro/src/content/api/5x/api/request/req-host.mdFixes broken relative link to trust proxy setting.
astro/src/content/api/5x/api/express/express.urlencoded.mdUpdates middleware doc link to /en/... route.
astro/src/content/api/5x/api/express/express.text.mdUpdates middleware doc link to /en/... route.
astro/src/content/api/5x/api/express/express.static.mdUpdates middleware/perf links to /en/... routes.
astro/src/content/api/5x/api/express/express.raw.mdUpdates middleware doc link to /en/... route.
astro/src/content/api/5x/api/express/express.json.mdUpdates middleware doc link to /en/... route.
astro/src/content/api/5x/api/application/overview.mdPoints “Application settings” to app-settings page.
astro/src/content/api/5x/api/application/app-use.mdNormalizes several guide/app-settings links.
astro/src/content/api/5x/api/application/app-settings.mdUpdates perf/behind-proxies links to /en/... routes.
astro/src/content/api/5x/api/application/app-set.mdLinks app settings table to app-settings page.
astro/src/content/api/5x/api/application/app-post-method.mdNormalizes routing guide link.
astro/src/content/api/5x/api/application/app-param.mdNormalizes routing guide anchor link.
astro/src/content/api/5x/api/application/app-onmount.mdUpdates “Application settings” link.
astro/src/content/api/5x/api/application/app-get.mdLinks app settings table to app-settings page.
astro/src/content/api/5x/api/application/app-get-method.mdNormalizes routing guide link.
astro/src/content/api/5x/api/application/app-enabled.mdLinks app settings table to app-settings page.
astro/src/content/api/5x/api/application/app-enable.mdLinks app settings table to app-settings page.
astro/src/content/api/5x/api/application/app-disabled.mdLinks app settings table to app-settings page.
astro/src/content/api/5x/api/application/app-disable.mdLinks app settings table to app-settings page.
astro/src/content/api/5x/api/application/app-delete-method.mdNormalizes routing guide link.
astro/src/content/api/5x/api/application/app-METHOD.mdNormalizes routing guide link.
astro/src/content/api/5x/api.mdAdds (placeholder) top-level API page for 5x.
astro/src/content/api/4x/api/response/res-status.mdSwitches Node docs link to HTTPS.
astro/src/content/api/4x/api/response/res-render.mdUpdates template-engine guide link to /en/... route.
astro/src/content/api/4x/api/response/res-redirect.mdFixes RFC anchor + security link anchor format.
astro/src/content/api/4x/api/response/res-location.mdFixes security link anchor format.
astro/src/content/api/4x/api/response/res-jsonp.mdReplaces in-page anchor with absolute app-settings link.
astro/src/content/api/4x/api/request/req-subdomains.mdUpdates app.set link to /en/4x/api#....
astro/src/content/api/4x/api/request/req-query.mdReplaces #app.settings.table anchors with app-settings page links.
astro/src/content/api/4x/api/request/req-path.mdUpdates app.use link to /en/4x/api#....
astro/src/content/api/4x/api/request/req-params.mdUpdates routing/app.param links to /en/... routes.
astro/src/content/api/4x/api/request/req-ips.mdUpdates trust proxy link to /en/4x/api#....
astro/src/content/api/4x/api/request/req-ip.mdUpdates trust proxy link to /en/4x/api#....
astro/src/content/api/4x/api/request/req-hostname.mdUpdates trust proxy link to /en/4x/api#....
astro/src/content/api/4x/api/express/express.urlencoded.mdUpdates middleware doc link to /en/... route.
astro/src/content/api/4x/api/express/express.text.mdUpdates middleware doc link to /en/... route.
astro/src/content/api/4x/api/express/express.static.mdUpdates middleware/perf links to /en/... routes.
astro/src/content/api/4x/api/express/express.raw.mdUpdates middleware doc link to /en/... route.
astro/src/content/api/4x/api/express/express.json.mdUpdates middleware doc link to /en/... route.
astro/src/content/api/4x/api/application/overview.mdPoints “Application settings” to app-settings page.
astro/src/content/api/4x/api/application/app-use.mdNormalizes several guide/app-settings links.
astro/src/content/api/4x/api/application/app-settings.mdUpdates perf/behind-proxies links to /en/... routes.
astro/src/content/api/4x/api/application/app-set.mdLinks app settings table to app-settings page.
astro/src/content/api/4x/api/application/app-post-method.mdNormalizes routing guide link.
astro/src/content/api/4x/api/application/app-param.mdNormalizes routing guide anchor link.
astro/src/content/api/4x/api/application/app-onmount.mdUpdates “Application settings” link.
astro/src/content/api/4x/api/application/app-get.mdLinks app settings table to app-settings page.
astro/src/content/api/4x/api/application/app-get-method.mdNormalizes routing guide link.
astro/src/content/api/4x/api/application/app-enabled.mdLinks app settings table to app-settings page.
astro/src/content/api/4x/api/application/app-enable.mdLinks app settings table to app-settings page.
astro/src/content/api/4x/api/application/app-disabled.mdLinks app settings table to app-settings page.
astro/src/content/api/4x/api/application/app-disable.mdLinks app settings table to app-settings page.
astro/src/content/api/4x/api/application/app-delete-method.mdNormalizes routing guide link.
astro/src/content/api/4x/api/application/app-METHOD.mdNormalizes routing guide link.
astro/src/content/api/4x/api.mdAdds (placeholder) top-level API page for 4x.
astro/src/content/api/3x/api/response/overview.mdAdds placeholder response overview page.
astro/src/content/api/3x/api.mdAdds top-level 3x API page with includes and EOL warning.
astro/src/content.config.tsAdds api content collection.
astro/src/config/menu/middleware.tsRemoves connect-rid menu entry (likely broken link).
astro/package.jsonAdds globals dependency (eslint globals config).
astro/eslint.config.jsUses globals + globalIgnores for ESLint flat config.
astro/astro.config.mjsSets site dynamically for Netlify preview deployments.
astro/CONTRIBUTING.mdUpdates contributing page URL format.
astro/.lycheeignoreAdds ignore rules to reduce rate limiting / false positives.
.github/workflows/build.ymlAdds 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 threadastro/.lycheeignore
Comment threadastro/src/content/api/4x/api/application/app-set.md
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
Copy Markdown
MemberAuthor

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 redesignMar 15, 2026
12 checks passed
@bjohansebas
bjohansebas deleted the link-check branch March 15, 2026 20:55
@bjohansebasbjohansebas mentioned this pull request Apr 4, 2026
Sign up for freeto 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

@bjohansebas