Audit and fix accessibility issues across the portfolio to ensure WCAG 2.1 AA compliance.
中文简介正在准备中。当前显示原文说明。
Deploy and manage the portfolio on Cloudflare Workers via OpenNext adapter.
中文简介正在准备中。当前显示原文说明。
安装前可以查看交给 AI 代理的指令内容。
Deploy and manage the portfolio on Cloudflare Workers using the @opennextjs/cloudflare adapter. The portfolio is a Next.js 16 app compiled to Cloudflare Workers via OpenNext.
wrangler.jsonc or open-next.config.ts@opennextjs/cloudflare or wrangler packages| File | Purpose |
|---|---|
wrangler.jsonc | Worker config: name, compatibility_date, build command, assets |
open-next.config.ts | OpenNext Cloudflare config (minimal, uses defineCloudflareConfig) |
package.json | Scripts: cloudflare:build, cloudflare:dev, cloudflare:deploy |
wrangler.jsonc:
{
"name": "namias",
"main": ".open-next/worker.js",
"compatibility_date": "2026-05-29",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"build": {
"command": "npx opennextjs-cloudflare build --dangerouslyUseUnsupportedNextVersion"
},
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS"
}
}
Note: --dangerouslyUseUnsupportedNextVersion is required because @opennextjs/cloudflare v1.19.x does not officially support Next.js 16.
npm run cloudflare:dev
This starts the Worker locally via wrangler dev. Note: may have issues on Windows — use WSL for best results.
npm run cloudflare:build
This runs opennextjs-cloudflare build which:
next build (generates .next/ output).open-next/worker.js).open-next/assets/)npm run cloudflare:deploy
Requires CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID environment variables.
The cloudflare-deploy.yml workflow:
main or workflow_dispatchnpm ci → SBOM generation → Cosign signing → npm run cloudflare:deploy| Issue | Status |
|---|---|
Next.js 16 middleware.ts convention | Deprecated; use proxy.ts instead. OpenNext detects middleware.ts as Node.js middleware. |
output: 'standalone' | Set conditionally (isWindows ? undefined : 'standalone') — OpenNext handles its own output |
next-sanity peer dependency | Requires next ^14.2 || ^15.0.0 but works with 16.x via the danger flag |
| Windows builds | OpenNext warns about Windows; use WSL for production builds |
Build fails with "Node.js middleware is not currently supported":
src/middleware.ts is the file (not src/proxy.ts)middleware.ts and export middleware functionBuild fails with TypeScript errors:
.next/ directory: Remove-Item -Path .next -Recurse -ForceWorker deployment fails:
CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID are setwrangler.jsonc matches the Cloudflare dashboardwrangler.jsonc configured correctlyopen-next.config.ts uses defineCloudflareConfig--dangerouslyUseUnsupportedNextVersion flag is presentnodejs_compat compatibility flag is setnpm run cloudflare:build)npm run cloudflare:deploy)还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Audit and fix accessibility issues across the portfolio to ensure WCAG 2.1 AA compliance.
中文简介正在准备中。当前显示原文说明。
Creates a new blog post document in the Sanity studio. Use when the user wants to write a blog post, publish an article, or schedule a future post.
中文简介正在准备中。当前显示原文说明。
Creates a new certification document in the Sanity studio. Use when the user wants to add a credential, certificate, or professional accreditation to the Certifications collection.
中文简介正在准备中。当前显示原文说明。
Adds a new skill MD file to the studio's skills collection. Use when the user wants to author a new step-by-step recipe for the studio's in-app Skills tool or the .agents mirror.
中文简介正在准备中。当前显示原文说明。
Creates a new project document in the Sanity studio. Use when the user wants to add a new portfolio project, a case study, or a work sample to the Projects collection.
中文简介正在准备中。当前显示原文说明。
Creates a new experience document in the Sanity studio. Use when the user wants to add a job, role, internship, or work history entry to the Experience collection.
中文简介正在准备中。当前显示原文说明。