Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig: https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[Makefile]
indent_style = tab
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Codeowners
.github/CODEOWNERS @expressjs/docs-captains

# Blog
_posts @expressjs/express-tc
# Blog - TODO: Add once Astro blog structure is set up
# _posts @expressjs/express-tc
77 changes: 77 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: ci

on:
pull_request:
branches:
- redesign
pull_request_review:
types: [submitted]
push:
branches:
- redesign

# Cancel in progress workflows
# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
concurrency:
group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft != true &&
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
github.event_name != 'pull_request_review'

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v6
with:
# node-version-file: ".nvmrc" use when .nvmrc is on root of the repo
node-version: "24.13"
# cache: "npm" use when package-lock.json is on root of the repo

- name: Install Node.js dependencies
working-directory: astro
run: npm ci

- name: Run tests
working-directory: astro
shell: bash
run: npm run check

build:
name: build
runs-on: ubuntu-latest
if: |
github.event.pull_request.draft != true &&
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
github.event_name != 'pull_request_review'

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v6
with:
# node-version-file: ".nvmrc" use when .nvmrc is on root of the repo
node-version: "24.13"
# cache: "npm" use when package-lock.json is on root of the repo

- name: Install Node.js dependencies
working-directory: astro
run: npm ci

- name: Build Astro site
working-directory: astro
run: npm run build
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ _site
.jekyll-metadata
vendor
.bundle

pnpm-lock.yaml
yarn.lock
bun.lockb

.astro/
dist/

.env
.env.*
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"astro-build.astro-vscode",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"prettier.enable": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[astro]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
24 changes: 24 additions & 0 deletions astro/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/
1 change: 1 addition & 0 deletions astro/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
5 changes: 5 additions & 0 deletions astro/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
.astro/
node_modules/
package-lock.json
pnpm-lock.yaml
9 changes: 9 additions & 0 deletions astro/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5",
"printWidth": 100,
"plugins": ["prettier-plugin-astro"]
}
129 changes: 129 additions & 0 deletions astro/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Contributing to Expressjs.com

### The Official Documentation of the Express.js Framework

This is the contribution documentation for the [expressjs.com](https://github.com/expressjs/expressjs.com) website.

> [!NOTE]
> 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.

#### Need some ideas? These are some typical issues.

1. **Website issues**: If you see anything on the site that could use a tune-up, think about how to fix it.
- Display or screen sizing problems
- Mobile responsiveness issues
- Missing or broken accessibility features
- Website outages
- Broken links
- Page structure or user interface enhancements

2. **Content Issues**: Fix anything related to site content or typos.
- Spelling errors
- Incorrect/outdated Express.js documentation
- Missing content

3. **Translation Issues**: Fix any translation errors or contribute new content.
- Fix spelling errors
- Fix incorrect/poorly translated words
- Check out the [Contributing translations](#contributing-translations) section below for a contributing guide.

#### Want to work on a backlog issue?

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.

#### Have an idea? Found a bug?

If you've found a bug or a typo, or if you have an idea for an enhancement, you can:

- 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.

- 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.

## Getting Started

The steps below will guide you through the Expressjs.com contribution process.

#### Step 1: (OPTIONAL) Open a New Issue

So you've found a problem that you want to fix, or have a site enhancement you want to make.

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.
- 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.
- For submissions proposing minor improvements or corrections, this is not needed. You can skip this step.
- 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.

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.
- For submissions proposing significant change, we encourage you to follow the review process before starting work.

#### Step 2: Get the Application Code Base

## Prerequisites

- **Node.js**: v24.13.0 or higher
- **npm**: v11.0.0 or higher (comes with Node 24)

> 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.

## Getting Started

1. **Clone the repository:**

```bash
git clone https://github.com/expressjs/expressjs.com.git
cd expressjs.com
```

2. **Install the correct Node.js version** (if using nvm):

```bash
nvm install
nvm use
```

3. **Install dependencies:**

```bash
npm install
```

4. **Start the development server:**

```bash
npm run dev
```

The site will be available at `http://localhost:4321`

## Available Scripts

| Command | Description |
| ----------------- | ---------------------------------------- |
| `npm run dev` | Start development server with hot reload |
| `npm run build` | Build production site to `./dist` |
| `npm run preview` | Preview production build locally |

## Project Structure

```
astro/
├── src/
│ ├── assets/ # Static assets (images, icons, etc.)
│ ├── components/ # Reusable UI components
│ │ ├── patterns/ # Complex UI patterns
│ │ └── primitives/ # Base UI primitives
│ ├── config/ # Configuration files
│ ├── content/ # Content collections
│ │ └── docs/ # Documentation content
│ ├── i18n/ # Internationalization
│ ├── layouts/ # Page layouts
│ ├── pages/ # Route pages
│ │ └── [lang]/ # Localized pages
│ ├── styles/ # Global styles
│ │ ├── base/ # Base styles
│ │ ├── tokens/ # Design tokens
│ │ └── utilities/ # Utility classes
│ └── utils/ # Utility functions
├── public/ # Static assets
│ └── fonts/ # Font files
└── astro.config.mjs # Astro configuration
```
7 changes: 7 additions & 0 deletions astro/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# expressjs.com

This is the repository of the website [expressjs.com](https://expressjs.com). It is hosted directly from the repository as a [GitHub Pages](https://pages.github.com/) website.

## Contributing

Any person who wants to contribute to the Website is welcome! Please read [Contributors' Guide](CONTRIBUTING.md) for more information on contributing to the Express.js documentation.
14 changes: 14 additions & 0 deletions astro/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// @ts-check
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import icon from 'astro-icon';

// https://astro.build/config
export default defineConfig({
integrations: [mdx(), icon()],
markdown: {
shikiConfig: {
theme: 'github-dark',
},
},
});
34 changes: 34 additions & 0 deletions astro/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintAstroPlugin from 'eslint-plugin-astro';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import eslintConfigPrettier from 'eslint-config-prettier';

export default [
// Global ignores
{
ignores: ['dist/', '.astro/', 'node_modules/', 'package-lock.json'],
},

// Base ESLint recommended rules
eslint.configs.recommended,

// TypeScript ESLint recommended rules
...tseslint.configs.recommended,

// Astro files
...eslintAstroPlugin.configs.recommended,
...eslintAstroPlugin.configs['jsx-a11y-recommended'],

// JSX Accessibility for non-Astro files
{
files: ['**/*.{jsx,tsx}'],
plugins: {
'jsx-a11y': jsxA11y,
},
rules: jsxA11y.configs.recommended.rules,
},

// Prettier - keep as last to override conflicting rules
eslintConfigPrettier,
];
Loading
Loading