Skip to content

Fix broken sidebar menu links#2363

Open
krzysdz wants to merge 1 commit into
expressjs:mainfrom
krzysdz:fix-sidebar-menu-links
Open

Fix broken sidebar menu links#2363
krzysdz wants to merge 1 commit into
expressjs:mainfrom
krzysdz:fix-sidebar-menu-links

Conversation

@krzysdz
Copy link
Copy Markdown
Contributor

@krzysdz krzysdz commented Jun 1, 2026

Fixes #2359

With this and #2324 (and #2356, which should not be necessary for this), lychee with --include-fragments (and excluded language versions other than English) reports 0 errors.

One broken menu item in 4.x:

  • /en/4x/api/request#reqparamname: separated 4.x and 3.x cases, as 4.x allows a default value (at least according to docs content)

Broken menu items in 3.x:

  • /en/3x/api/application#appallpath-callback--callback-: moved optional parameter to last pos to match 4.x and 5.x header
  • /en/3x/api/application#applistenport-host-backlog-callback: separated 3.x from 4.x/5.x
  • /en/3x/api/application#apprenderview-locals-callback: renamed options to locals (see 9162fa1)
  • /en/3x/api/application#appusepath-callback--callback: separated 3.x from 4.x/5.x as according to API docs 3.x allows only one function per .use call
  • /en/3x/api/request#reqheaderfield: merged with 4.x/5.x req.get() menu header, because it has been this way in old docs and I could not find req.header() outside req.get() description:
    <h3 id='req.get'>req.get(field)</h3>
    Get the case-insensitive request header `field`. The "Referrer" and "Referer" fields are interchangeable.
    ```js
    req.get('Content-Type')
    // => "text/plain"
    req.get('content-type')
    // => "text/plain"
    req.get('Something')
    // => undefined
    ```
    p Aliased as `req.header(field)`.

    section
    h3(id='req.get') req.get(field)
    p
    | Get the case-insensitive request header <code>field</code>.
    | The <em>Referrer</em> and <em>Referer</em> fields are interchangeable.
    +js.
    req.get('Content-Type');
    // => "text/plain"
    req.get('content-type');
    // => "text/plain"
    req.get('Something');
    // => undefined
    p Aliased as <code>req.header(field)</code>.
  • /en/3x/api/response#resclearcookiename--options: used header from 4.x/5.x (comma moved into [])
  • /en/3x/api/response#rescookiename-value--options: used header from 4.x/5.x (comma moved into [])
  • /en/3x/api/response#resdownloadpath--filename--options--fn: separated 3.x from 4.x/5.x, because signature is different
  • /en/3x/api/response#resjsonbody: separated 3.x from 4.x/5.x, because 3.x allows optional status
  • /en/3x/api/response#resjsonpbody: separated 3.x from 4.x/5.x, because 3.x allows optional status
  • /en/3x/api/response#reslocationpath: renamed 3.x to match 4.x/5.x header
  • /en/3x/api/response#resredirectstatus-path: renamed 3.x to match 4.x/5.x header and updated docs content to match (copied from 4.x)
  • /en/3x/api/response#resrenderview--locals--callback: changed header to match 4.x (callback is optional); the 3.x docs are not great and somewhat differ from JSDoc
  • /en/3x/api/response#ressendbody: separated 3.x from 4.x/5.x, because 3.x allows optional status
  • /en/3x/api/response#ressetfield--value: used header from 4.x/5.x (comma moved into [])

One broken menu item in 4.x
- `/en/4x/api/request#reqparamname`: separated 4.x and 3.x cases, as 4.x allows a default value (at least according to docs content)

Broken menu items in 3.x
- `/en/3x/api/application#appallpath-callback--callback-`: moved optional parameter to last pos to match 4.x and 5.x header
- `/en/3x/api/application#applistenport-host-backlog-callback`: separated 3.x from 4.x/5.x
- `/en/3x/api/application#apprenderview-locals-callback`: renamed `options` to locals (see expressjs@9162fa1)
- `/en/3x/api/application#appusepath-callback--callback`: separated 3.x from 4.x/5.x as according to API docs 3.x allows only one function per .use call
- `/en/3x/api/request#reqheaderfield`: merged with 4.x/5.x `req.get()` menu header, because it has been this way in old docs and I could not find `req.header()` outside `req.get()` description: https://github.com/expressjs/expressjs.com/blob/old-website/_includes/api/en/3x/req-header.md, https://github.com/expressjs/expressjs.com/blob/9e957d4e2c46a9042e1b4bcf9fcee686e3db5a71/en/api/req-header.jade
- `/en/3x/api/response#resclearcookiename--options`: used header from 4.x/5.x (comma moved into [])
- `/en/3x/api/response#rescookiename-value--options`: used header from 4.x/5.x (comma moved into [])
- `/en/3x/api/response#resdownloadpath--filename--options--fn`: separated 3.x from 4.x/5.x, because signature is different
- `/en/3x/api/response#resjsonbody`: separated 3.x from 4.x/5.x, because 3.x allows optional status
- `/en/3x/api/response#resjsonpbody`: separated 3.x from 4.x/5.x, because 3.x allows optional status
- `/en/3x/api/response#reslocationpath`: renamed 3.x to match 4.x/5.x header
- `/en/3x/api/response#resredirectstatus-path`: renamed 3.x to match 4.x/5.x header and updated docs content to match (copied from 4.x)
- `/en/3x/api/response#resrenderview--locals--callback`: changed header to match 4.x (callback is optional); the 3.x docs are not great and somewhat differ from JSDoc (https://github.com/expressjs/express/blob/cb59086305367d9fcd7d63b53cfca1a3e4ef77d7/lib/response.js#L808-L846)
- `/en/3x/api/response#ressendbody`: separated 3.x from 4.x/5.x, because 3.x allows optional status
- `/en/3x/api/response#ressetfield--value`: used header from 4.x/5.x (comma moved into [])
@krzysdz krzysdz requested a review from a team as a code owner June 1, 2026 01:17
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 55b0e96
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6a1cdd9e512fed00081ab18c
😎 Deploy Preview https://deploy-preview-2363--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: 97 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

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

@krzysdz
Copy link
Copy Markdown
Contributor Author

krzysdz commented Jun 1, 2026

In the future we should somehow generate the menu based on the content, because doing it manually is very error-prone.

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.

Sidebar has bad links to some methods with optional arguments

1 participant