Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
110 changes: 110 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
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

linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

# TODO: use astro action, when pnpm action is enabled in the org
- 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

- name: Check links
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
with:
workingDirectory: astro # TODO: change when Astro site is moved to root
args: |
--root-dir $PWD/dist
--remap 'https://expressjs\.com\/(.*)/ file://'$PWD'/dist/$1/index.html'
dist/
fail: true
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Crowdin Upload

on:
push:
branches: [ gh-pages ]
branches: [gh-pages]
workflow_dispatch:

permissions:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/sync-orama.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Sync Orama Cloud

on:
workflow_dispatch:
push:
branches:
- redesign
pull_request:
branches:
- redesign

permissions:
contents: read

concurrency:
group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: ${{ github.event_name != 'push' }}

jobs:
sync-orama-cloud:
name: Sync Orama Cloud
runs-on: ubuntu-latest

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: Sync Orama Cloud
working-directory: astro
run: node ./scripts/sync-orama.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLIC_ORAMA_PROJECT_ID: ${{ github.event_name == 'push' && secrets.PUBLIC_ORAMA_PRODUCTION_PROJECT_ID || secrets.PUBLIC_ORAMA_PROJECT_ID }}
PRIVATE_ORAMA_API_KEY: ${{ github.event_name == 'push' && secrets.PRIVATE_ORAMA_PRODUCTION_API_KEY || secrets.PRIVATE_ORAMA_API_KEY }}
PUBLIC_ORAMA_DATASOURCE_ID: ${{ github.event_name == 'push' && secrets.PUBLIC_ORAMA_PRODUCTION_DATASOURCE_ID || secrets.PUBLIC_ORAMA_DATASOURCE_ID }}
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.*
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"astro-build.astro-vscode",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx"
],
"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/
23 changes: 23 additions & 0 deletions astro/.lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Prevent rate limit for npmjs links

http://npmjs.com/.*
https://npmjs.com/.*
https://www.npmjs.com/.*
https://npmjs.org/.*
https://www.npmjs.org/.*

# Prevent github rate limit
https://github.com/.*

# Exclude 404 pages
dist/.*/404/index.html$
dist/404/index.html$

# Exclude Open Collective links
https://opencollective.com/.*

# Prevent netlify rate limit
https://www.netlify.com/

## Ignore temporaly sitemap
https://expressjs.com/sitemap-index.xml
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"]
}
Loading