Files
cwd/docs/guide/update-version.md
anghunk 4095473a79 feat: 改进评论系统管理员识别与样式展示
- 后端评论接口增加 isAdmin 字段,不再依赖前端邮箱比对
- 管理后台评论列表支持 Markdown 渲染并添加相应样式
- 前端组件移除 adminEmail 依赖,改用 comment.isAdmin 字段
- 添加 CSS 样式兼容其他框架导入的表情元素
- 更新文档说明部署流程
2026-01-27 15:13:51 +08:00

41 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 更新部署
重新拉取 GitHub 项目代码。
## 后端更新
接口逻辑相关的更新,需要重新部署到 Cloudflare Workers.
```
cd cwd-api
npm install
npm run deploy
```
重新部署到 Cloudflare Workers.
## 前端更新
如果你的管理后台项目,是通过 GitHub 仓库部署到 Cloudflare Pages不需要手动更新只用拉取官方仓库代码重新推送即可触发重新部署无需手动
### 管理后台
如果使用官方后台不需要更新。
> [!WARNING]
> 存在一个弊端,如果官方后台版本有了大更新,而你部署的 api 端没有及时更新部署,可能会导致管理后台无法正常使用(无法获取到最新的接口),正常情况下无需担心。
```
cd cwd-admin
npm install
npm run build
```
将打包后的代码更新到你托管的地方(例如 Cloudflare Pages、GitHub Pages、Netlify 等)。
### 评论端
如果使用官方评论端 js `https://cwd.js.org/cwd.js`,不需要更新。
如果你想自行托管,请使用打包命令,对仓库 `@docs/widget` 文件夹进行构建,然后把 `dist` 文件夹中的最新的 `cwd.js` 文件上传到你托管的地方。