expressjs.com icon indicating copy to clipboard operation
expressjs.com copied to clipboard

Fix: Add missing API sections to non-English 4.x documentation

Open Farhan291 opened this issue 4 months ago • 2 comments

Description

Fixes broken anchor links in all non-English versions of the 4.x API documentation by adding missing API sections.

Closes #2068

Problem

All non-English language versions only included the app section, causing broken anchor links such as:

  • #req.method
  • #res.send
  • #router
  • #express

Example broken links:

  • https://expressjs.com/de/4x/api.html#req.method
  • https://expressjs.com/fr/4x/api.html#res.send

The English version works correctly: https://expressjs.com/en/4x/api.html

Root Cause

The markdown files for non-English versions only included: {% include api/en/4x/app.md %} They were missing the other four sections and their anchor tags.

Solution

Added the missing {% include %} statements and anchor tags for all API sections to match the English documentation structure:

  • express.md (Express function)
  • req.md (Request object)
  • res.md (Response object)
  • router.md (Router)

Changes Made

Updated the following files to include all 5 API sections with proper anchor tags:

  • de/4x/api.md (German)
  • fr/4x/api.md (French)
  • es/4x/api.md (Spanish)
  • it/4x/api.md (Italian)
  • ja/4x/api.md (Japanese)
  • pt-br/4x/api.md (Portuguese)
  • zh-cn/4x/api.md (Chinese Simplified)
  • zh-tw/4x/api.md (Chinese Traditional)

Testing

  • [x] Tested locally using bundle exec jekyll serve
  • [x] Verified all anchor links work correctly
  • [x] Confirmed structure matches English version
  • [x] Tested multiple languages (de, fr, es)

Farhan291 avatar Oct 05 '25 09:10 Farhan291

Deploy Preview for expressjscom-preview ready!

Name Link
Latest commit 7dec2548d4bb20b8c8f8f969b1ee8f88d3cba42d
Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/693e2d47bfe4dd000899b100
Deploy Preview https://deploy-preview-2076--expressjscom-preview.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

netlify[bot] avatar Oct 05 '25 09:10 netlify[bot]

🚦 Lighthouse Results (Mobile & Desktop)

URL Device Perf A11y Best Practices
/ mobile 🔴 68 🟢 100 🟢 96
/en/blog/posts.html mobile 🟢 98 🟢 96 🟢 96
/en/5x/api.html mobile 🔴 73 🟢 95 🟢 96
/ desktop 🟢 100 🟢 100 🟢 96
/en/blog/posts.html desktop 🟢 100 🟢 96 🟢 92
/en/5x/api.html desktop 🟢 100 🟢 95 🟢 96

github-actions[bot] avatar Oct 05 '25 09:10 github-actions[bot]