项目部署

System Requirements:

  • Node.js 18.18 or later.
  • macOS, Windows (including WSL), and Linux are supported.

本地部署

确保你已安装 Node.js

# Installation(安装依赖)
yarn

# Local Development (本地开发)
yarn dev

# build and start (构建并启动)
yarn build && yarn start

# Deploy for a single language(单一语言部署)
yarn build:lang en
yarn build:lang zh
yarn build:lang zh-hant

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying src/app/[locale]/page.tsx. The page auto-updates as you edit the file.

Vercel 部署

点击下方按钮,一键将 MD Translator 部署到 Vercel 平台:

Vercel

通过 Vercel,你可以快速将项目托管,并且可以自动处理构建和部署,适合没有复杂服务器配置需求的用户。

Cloudflare Pages 部署

点击下方按钮或链接 Fork 本项目,然后按照以下步骤在 Cloudflare Pages 上部署:

👉 Fork 本项目

部署步骤:

  1. 登录 Cloudflare Pages
  2. 点击 "Create a project"
  3. 绑定你刚刚 Fork 的 GitHub 仓库
  4. 配置构建和部署参数:
    • 构建命令npm run build
    • 构建输出目录out
    • 环境变量:添加变量 NODE_VERSION,值设为 22.14.0
  5. 点击部署按钮,开始构建!

🎉 完成后即可访问你的字幕翻译器页面!