docs: upgrade docs site to Astro 6 and update Node.js prerequisites (#244)
Upgrades the docs site from Astro 5/Starlight 0.37 to Astro 6/Starlight 0.38. Adds Cloudflare adapter for deployment. Updates Node.js prerequisites across all docs to match Astro 6's requirement of v22.12.0+. Bumps catalog versions for @astrojs/cloudflare and wrangler.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import cloudflare from "@astrojs/cloudflare";
|
||||||
import starlight from "@astrojs/starlight";
|
import starlight from "@astrojs/starlight";
|
||||||
// @ts-check
|
// @ts-check
|
||||||
import { defineConfig } from "astro/config";
|
import { defineConfig } from "astro/config";
|
||||||
@@ -162,4 +163,6 @@ export default defineConfig({
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
adapter: cloudflare(),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,18 +8,20 @@
|
|||||||
"start": "astro dev",
|
"start": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro"
|
"astro": "astro",
|
||||||
|
"generate-types": "wrangler types"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/starlight": "^0.37.4",
|
"@astrojs/cloudflare": "^13.1.7",
|
||||||
"@astrojs/starlight-tailwind": "^4.0.2",
|
"@astrojs/starlight": "^0.38.2",
|
||||||
"astro": "^5.6.1",
|
"@astrojs/starlight-tailwind": "^5.0.0",
|
||||||
|
"astro": "^6.1.3",
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
"starlight-utils": "^1.0.0",
|
"starlight-utils": "^1.0.0",
|
||||||
"tailwindcss": "^4.1.18",
|
"tailwindcss": "^4.1.18",
|
||||||
"wrangler": "^4.63.0"
|
"wrangler": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"overrides": {
|
||||||
"peerDependencies": {},
|
"vite": "^7"
|
||||||
"optionalDependencies": {}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,11 +5,11 @@ description: Deploy EmDash to any Node.js hosting platform.
|
|||||||
|
|
||||||
import { Aside, Steps, Tabs, TabItem } from "@astrojs/starlight/components";
|
import { Aside, Steps, Tabs, TabItem } from "@astrojs/starlight/components";
|
||||||
|
|
||||||
EmDash runs on any Node.js 18+ hosting platform. This guide covers deployment to common providers using SQLite and local or S3-compatible storage.
|
EmDash runs on any Node.js 22+ hosting platform. This guide covers deployment to common providers using SQLite and local or S3-compatible storage.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- Node.js 18.17.1 or higher
|
- Node.js v22.12.0 or higher
|
||||||
- A Node.js hosting provider or VPS
|
- A Node.js hosting provider or VPS
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
@@ -91,14 +91,14 @@ export default defineConfig({
|
|||||||
Create a `Dockerfile`:
|
Create a `Dockerfile`:
|
||||||
|
|
||||||
```dockerfile title="Dockerfile"
|
```dockerfile title="Dockerfile"
|
||||||
FROM node:20-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:20-alpine
|
FROM node:22-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ This guide walks you through creating your first EmDash site, from installation
|
|||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- **Node.js** 18.17.1 or higher
|
- **Node.js** v22.12.0 or higher (odd-numbered versions are not supported)
|
||||||
- **npm**, **pnpm**, or **yarn**
|
- **npm**, **pnpm**, or **yarn**
|
||||||
- A code editor (VS Code recommended)
|
- A code editor (VS Code recommended)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict",
|
"extends": "astro/tsconfigs/strict",
|
||||||
"include": [".astro/types.d.ts", "**/*"],
|
"include": [".astro/types.d.ts", "**/*", "./worker-configuration.d.ts"],
|
||||||
"exclude": ["dist"]
|
"exclude": ["dist"]
|
||||||
}
|
}
|
||||||
|
|||||||
21
docs/wrangler.jsonc
Normal file
21
docs/wrangler.jsonc
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"$schema": "node_modules/wrangler/config-schema.json",
|
||||||
|
"compatibility_date": "2026-03-01",
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"pattern": "docs.emdashcms.com",
|
||||||
|
"custom_domain": true,
|
||||||
|
"zone_name": "emdashcms.com",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"compatibility_flags": ["global_fetch_strictly_public", "nodejs_compat"],
|
||||||
|
"name": "docs",
|
||||||
|
"main": "@astrojs/cloudflare/entrypoints/server",
|
||||||
|
"assets": {
|
||||||
|
"directory": "./dist",
|
||||||
|
"binding": "ASSETS",
|
||||||
|
},
|
||||||
|
"observability": {
|
||||||
|
"enabled": true,
|
||||||
|
},
|
||||||
|
}
|
||||||
990
pnpm-lock.yaml
generated
990
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@ packages:
|
|||||||
catalog:
|
catalog:
|
||||||
"@arethetypeswrong/cli": ^0.18.2
|
"@arethetypeswrong/cli": ^0.18.2
|
||||||
"@astrojs/check": ^0.9.7
|
"@astrojs/check": ^0.9.7
|
||||||
"@astrojs/cloudflare": ^13.0.1
|
"@astrojs/cloudflare": ^13.1.7
|
||||||
"@astrojs/node": ^10.0.0
|
"@astrojs/node": ^10.0.0
|
||||||
"@astrojs/react": ^5.0.0
|
"@astrojs/react": ^5.0.0
|
||||||
"@cloudflare/workers-types": ^4.20260305.1
|
"@cloudflare/workers-types": ^4.20260305.1
|
||||||
@@ -46,4 +46,4 @@ catalog:
|
|||||||
tsdown: 0.20.3
|
tsdown: 0.20.3
|
||||||
typescript: ^5.9.3
|
typescript: ^5.9.3
|
||||||
vitest: ^4.0.18
|
vitest: ^4.0.18
|
||||||
wrangler: ^4.71.0
|
wrangler: ^4.80.0
|
||||||
|
|||||||
Reference in New Issue
Block a user