-
Notifications
You must be signed in to change notification settings - Fork 0
Deploy Vercel
Aafff623 edited this page Aug 8, 2026
·
2 revisions
默认部署:Vercel(项目名 fork-firefly),连 GitHub Aafff623/fork-Firefly。
线上:https://fork-firefly.vercel.app
| 项 | 值 |
|---|---|
| Install | pnpm install |
| Build | pnpm build |
| 输出 |
dist/(含 Pagefind 索引) |
| 构建链 | LQIP → Astro → 字体子集 → Pagefind |
| Node | ≥ 22(建议 22.x) |
| Adapter | 默认 @astrojs/vercel;仅当环境变量 CF_WORKERS 时切 Cloudflare |
vercel.json 要点:
-
/archive/*→/timeline/(308) -
/_astro/*长缓存 - 基础安全响应头
本地 pnpm dev 预览 → 本地校验 → 确认后 push → 等 Vercel Ready → 再核线上
未本地验收不 push;未看线上不宣称「部署完成」。更完整流程见仓库 docs/agents/workflow.md。
-
不要把评论服务 token、私有 API Key 写进
src/config明文仓库 - Waline 服务在仓外(自建);客户端只配
serverURL等非密钥项 - SSR API(如部分
src/pages/api/*)依赖 Vercel serverless;密钥放 Vercel 项目 Environment Variables
可选,非默认。本站是静态优先博客;不要为了「试试」乱开 CF_WORKERS。若真要切,先读 astro.config.mjs / wrangler.jsonc 再动。
- 改
siteConfig.site_url - Vercel 绑定自定义域
- 自测 OG、sitemap、评论回调域名是否仍指向正确环境