Fix: Add missing API sections to non-English 4.x documentation #2076
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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
bundle exec jekyll serve