You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### The Official Documentation of the Express.js Framework
1
+
# Contributing to the expressjs.com website
4
2
5
3
This is the contribution documentation for the [expressjs.com](https://github.com/expressjs/expressjs.com) website.
6
4
7
5
> [!NOTE]
8
6
> This is not the repo for Express.js framework. To contribute to the _[Express.js framework](https://github.com/expressjs/express)_, check out the [GitHub repo contributing page](https://github.com/expressjs/express?tab=contributing-ov-file) or the website's [Contributing to Express](https://expressjs.com/en/resources/contributing.html) page.
9
7
10
-
#### Need some ideas? These are some typical issues.
8
+
###Common contributions
11
9
12
-
1.**Website issues**: If you see anything on the site that could use a tune-up, think about how to fix it.
10
+
1.**Website Issues**: Improvements to the site's functionality, design, or accessibility.
13
11
- Display or screen sizing problems
14
12
- Mobile responsiveness issues
15
13
- Missing or broken accessibility features
@@ -27,45 +25,55 @@ This is the contribution documentation for the [expressjs.com](https://github.co
27
25
- Fix incorrect/poorly translated words
28
26
- Check out the [Contributing translations](#contributing-translations) section below for a contributing guide.
29
27
30
-
#### Want to work on a backlog issue?
28
+
###Working on existing issues
31
29
32
-
We often have bugs or enhancements that need work. You can find these under our repo's [Issues tab](https://github.com/expressjs/expressjs.com/issues). Check out the tags to find something that's a good match for you.
30
+
We welcome contributions to existing bugs or enhancements. You can find these under our repo's [Issues tab](https://github.com/expressjs/expressjs.com/issues). Check out the tags to find something that matches your interests. Look for issues labeled `good first issue` or `help wanted` to get started.
33
31
34
-
#### Have an idea? Found a bug?
32
+
###Reporting bugs & requesting features
35
33
36
-
If you've found a bug or a typo, or if you have an idea for an enhancement, you can:
34
+
If you have found a bug, a typo, or have an idea for an enhancement, you can:
37
35
38
36
- Submit a [new issue](https://github.com/expressjs/expressjs.com/issues/new/choose) on our repo. Do this for larger proposals, or if you'd like to discuss or get feedback first.
39
37
40
38
- Make a [GitHub pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). If you have already done work, and it's ready to go, feel free to send it our way.
41
39
42
40
## Getting Started
43
41
44
-
The steps below will guide you through the Expressjs.com contribution process.
42
+
The steps below will guide you through the expressjs.com contribution process.
45
43
46
-
#### Step 1: (OPTIONAL) Open a New Issue
44
+
#### Step 1: Open an Issue (Optional)
47
45
48
-
So you've found a problem that you want to fix, or have a site enhancement you want to make.
46
+
If you have identified a problem or an enhancement:
49
47
50
48
1. If you want to get feedback or discuss, open a discussion [issue](https://github.com/expressjs/expressjs.com/issues/new/choose) prior to starting work. This is not required, but encouraged for larger proposals.
51
49
- While we highly encourage this step, it is only for submissions proposing significant change. It helps us to clarify and focus the work, and ensure it aligns with overall project priorities.
52
50
- For submissions proposing minor improvements or corrections, this is not needed. You can skip this step.
53
-
- When opening an issue please give it a title and fill in the description section. The more details you provide, the more feedback we can give.
51
+
- When opening an issue, please provide a clear title and complete description. The more details you provide, the more feedback we can give.
54
52
55
-
2. After receiving your issue the Express.js documentation team will respond with feedback. We read every submission and always try to respond quickly with feedback.
53
+
2. After receiving your issue, the Express.js documentation team will respond with feedback. We review all submissions and aim to respond as soon as possible.
56
54
- For submissions proposing significant change, we encourage you to follow the review process before starting work.
57
55
58
-
#### Step 2: Get the Application Code Base
56
+
#### Step 2: Get the project codebase
59
57
60
58
## Prerequisites
61
59
62
-
-**Node.js**: v24.13.0 or higher
60
+
### Development stack
61
+
62
+
This project uses:
63
+
64
+
-**Astro** for site generation
65
+
-**TypeScript** for type safety
66
+
-**ESLint** for linting
67
+
-**Prettier** for formatting
68
+
<!-- TODO: add testing framework -->
69
+
70
+
### Tooling
71
+
72
+
-**Node.js**: v24.x or higher
63
73
-**npm**: v11.0.0 or higher (comes with Node 24)
64
74
65
75
> We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage Node.js versions. This project includes an `.nvmrc` file for automatic version switching.
66
76
67
-
## Getting Started
68
-
69
77
1.**Clone the repository:**
70
78
71
79
```bash
@@ -96,13 +104,58 @@ So you've found a problem that you want to fix, or have a site enhancement you w
|`npm run dev`| Start development server with hot reload |
110
+
|`npm run build`| Build production site to `./dist`|
111
+
|`npm run preview`| Preview production build locally |
112
+
|`npm run lint`| Run ESLint to check for issues |
113
+
|`npm run check`| Run type checking and format verification |
114
+
115
+
## Submitting a pull request
116
+
117
+
1. Create a new branch from `redesign`
118
+
2. Make your changes
119
+
3. Run `npm run check` to verify code style and types
120
+
4. Commit with a clear message
121
+
5. Push to your fork
122
+
6. Open a PR against `redesign`
123
+
124
+
> Ensure all checks pass and your branch is up to date with `redesign` before opening a PR.
125
+
126
+
## Architecture policy
127
+
128
+
Although Astro supports integrations with frameworks such as React or Vue, this project intentionally avoids additional frontend frameworks.
129
+
130
+
The expressjs.com website is designed to use:
131
+
132
+
- HTML
133
+
- CSS
134
+
- TypeScript
135
+
136
+
This decision helps keep the codebase lightweight, easier to maintain, and accessible to a broader range of contributors.
137
+
138
+
### Do not introduce new frontend frameworks
139
+
140
+
Please do not introduce React, Vue, or other client-side frameworks without prior discussion and approval.
141
+
142
+
If a proposed feature appears to require a framework integration:
143
+
144
+
1. Open an issue first.
145
+
2. Explain the use case and why the existing stack (HTML, CSS, and TypeScript) is insufficient.
146
+
3. Wait for approval from the maintainers before proceeding.
147
+
148
+
Pull requests that introduce new framework dependencies without prior discussion may be closed.
149
+
150
+
### Existing exception
104
151
105
-
## Project Structure
152
+
> The search component is implemented using React to support the Orama-powered search experience.
153
+
> This is a limited, isolated integration and does not indicate that React (or other frameworks) should be used elsewhere in the project.
154
+
155
+
> [!IMPORTANT]
156
+
> Pull requests that introduce new framework dependencies without prior discussion may not be accepted.
157
+
158
+
## Project structure
106
159
107
160
```
108
161
astro/
@@ -112,8 +165,10 @@ astro/
112
165
│ │ ├── patterns/ # Complex UI patterns
113
166
│ │ └── primitives/ # Base UI primitives
114
167
│ ├── config/ # Configuration files
168
+
│ │ ├── menu/ # Menu configuration files (sidebars)
115
169
│ ├── content/ # Content collections
116
-
│ │ └── docs/ # Documentation content
170
+
│ │ ├── docs/ # Documentation content
171
+
│ │ └── resources/ # Resource pages
117
172
│ ├── i18n/ # Internationalization
118
173
│ ├── layouts/ # Page layouts
119
174
│ ├── pages/ # Route pages
@@ -125,5 +180,214 @@ astro/
125
180
│ └── utils/ # Utility functions
126
181
├── public/ # Static assets
127
182
│ └── fonts/ # Font files
128
-
└── astro.config.mjs # Astro configuration
183
+
├── astro.config.mjs # Astro configuration
184
+
```
185
+
186
+
## Content configuration
187
+
188
+
The site uses Astro's [Content Collections](https://docs.astro.build/en/guides/content-collections/) to manage documentation and resources. The configuration is defined in `src/content.config.ts`.
**Enabling versioning on a submenu** — Use `versioned` to specify which versions the menu supports. The version prefix will be automatically prepended to URLs:
310
+
311
+
```typescript
312
+
{
313
+
label: 'API Reference',
314
+
submenu: {
315
+
versioned: ['5x', '4x', '3x'], // Supports all three versions
316
+
sections: apiMenu.sections,
317
+
},
318
+
}
319
+
```
320
+
321
+
**Omitting items from specific versions** — Use `omitFrom` to hide an item in certain versions:
322
+
323
+
```typescript
324
+
{
325
+
href: `/api/application/app-mountpath`,
326
+
label: 'app.mountpath',
327
+
omitFrom: ['3x'], // Not available in Express 3.x
328
+
}
329
+
```
330
+
331
+
**Omitting entire sections from specific versions**:
332
+
333
+
```typescript
334
+
{
335
+
title: 'Router',
336
+
omitFrom: ['3x'], // Router section doesn't exist in 3.x
omitFrom?:VersionPrefix[]; // Versions to exclude this section from
360
+
};
361
+
362
+
typeMenuItem= {
363
+
label:string;
364
+
ariaLabel?:string;
365
+
icon?:string;
366
+
href?:string; // Link destination (omit if using submenu)
367
+
submenu?:Menu; // Nested menu (omit if using href)
368
+
omitFrom?:VersionPrefix[]; // Versions to exclude this item from
369
+
};
370
+
```
371
+
372
+
## Contributing translations
373
+
374
+
We use Crowdin to manage our translations in multiple languages and achieve automatic translation with artificial intelligence. Since these translations can be inefficient in some cases, we need help from the community to provide accurate and helpful translations.
375
+
376
+
The documentation is translated into these languages:
377
+
378
+
- Chinese Simplified (`zh-cn`)
379
+
- Chinese Traditional (`zh-tw`)
380
+
- English (`en`)
381
+
- French (`fr`)
382
+
- German (`de`)
383
+
- Italian (`it`)
384
+
- Japanese (`ja`)
385
+
- Korean (`ko`)
386
+
- Brazilian Portuguese (`pt-br`)
387
+
- Spanish (`es`)
388
+
389
+
### How to translate
390
+
391
+
1. Request to join the Express.js Website project on [Crowdin](https://express.crowdin.com/website)
392
+
2.[Select the language you want to translate](https://support.crowdin.com/for-translators/#starting-translation)
0 commit comments