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";
|
||||
// @ts-check
|
||||
import { defineConfig } from "astro/config";
|
||||
@@ -162,4 +163,6 @@ export default defineConfig({
|
||||
],
|
||||
}),
|
||||
],
|
||||
|
||||
adapter: cloudflare(),
|
||||
});
|
||||
|
||||
@@ -8,18 +8,20 @@
|
||||
"start": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
"astro": "astro",
|
||||
"generate-types": "wrangler types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/starlight": "^0.37.4",
|
||||
"@astrojs/starlight-tailwind": "^4.0.2",
|
||||
"astro": "^5.6.1",
|
||||
"@astrojs/cloudflare": "^13.1.7",
|
||||
"@astrojs/starlight": "^0.38.2",
|
||||
"@astrojs/starlight-tailwind": "^5.0.0",
|
||||
"astro": "^6.1.3",
|
||||
"sharp": "^0.34.5",
|
||||
"starlight-utils": "^1.0.0",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"wrangler": "^4.63.0"
|
||||
"wrangler": "catalog:"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"peerDependencies": {},
|
||||
"optionalDependencies": {}
|
||||
"overrides": {
|
||||
"vite": "^7"
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,11 @@ description: Deploy EmDash to any Node.js hosting platform.
|
||||
|
||||
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
|
||||
|
||||
- Node.js 18.17.1 or higher
|
||||
- Node.js v22.12.0 or higher
|
||||
- A Node.js hosting provider or VPS
|
||||
|
||||
## Configuration
|
||||
@@ -91,14 +91,14 @@ export default defineConfig({
|
||||
Create a `Dockerfile`:
|
||||
|
||||
```dockerfile title="Dockerfile"
|
||||
FROM node:20-alpine AS builder
|
||||
FROM node:22-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/dist ./dist
|
||||
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
|
||||
|
||||
- **Node.js** 18.17.1 or higher
|
||||
- **Node.js** v22.12.0 or higher (odd-numbered versions are not supported)
|
||||
- **npm**, **pnpm**, or **yarn**
|
||||
- A code editor (VS Code recommended)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [".astro/types.d.ts", "**/*"],
|
||||
"include": [".astro/types.d.ts", "**/*", "./worker-configuration.d.ts"],
|
||||
"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,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user