docs: 更新文档内容并添加搜索功能

- 修改首页标语格式,添加换行符
- 在侧边栏添加"更新部署"文档链接
- 新增"更新部署"指南文档
- 为文档添加本地搜索功能及中文翻译
This commit is contained in:
anghunk
2026-01-20 22:16:52 +08:00
parent cafabce917
commit bf28ce2e2a
4 changed files with 56 additions and 1 deletions

View File

@@ -34,5 +34,28 @@ export default defineConfig({
message: '基于 Cloudflare Workers 构建',
copyright: 'Copyright © 2026',
},
search: {
provider: 'local',
options: {
locales: {
zh: {
translations: {
button: {
buttonText: '搜索文档',
buttonAriaLabel: '搜索文档',
},
modal: {
noResultsText: '无法找到相关结果',
resetButtonTitle: '清除查询条件',
footer: {
selectText: '选择',
navigateText: '切换',
},
},
},
},
},
},
},
},
});

View File

@@ -5,6 +5,7 @@ export default [
{ text: '项目介绍', link: '/guide/getting-started' },
{ text: '后端配置', link: '/guide/backend-config' },
{ text: '前端配置', link: '/guide/frontend-config' },
{ text: '更新部署', link: '/guide/update-version' },
],
},
{

View File

@@ -0,0 +1,31 @@
# 更新部署
重新拉取 GitHub 项目代码
## 接口更新
```
cd cwd-comments-api
npm install
npm run deploy
```
重新部署到 Cloudflare Workers.
## 后台更新
```
cd cwd-comments-admin
npm install
npm run build
```
将打包后的代码更新到你托管的地方(例如 Cloudflare Pages、GitHub Pages、Netlify 等)。
## 评论端更新
使用最新的 `cwd-comments.js` ,你可以托管到任何地方,不受限制。
如果你不想自己托管,请使用官方的链接: `https://cwd-comments.zishu.me/cwd-comments.js`
不需要手动更新,每次评论端加载时会自动检查更新。

View File

@@ -3,7 +3,7 @@ layout: home
hero:
name: 'CWD 评论系统'
tagline: 轻量级、高性能的评论解决方案, 基于 Cloudflare Workers + D1 + KV 构建
tagline: 轻量级、高性能的评论解决方案<br>基于 Cloudflare Workers + D1 + KV 构建
image:
src: https://github.com/anghunk/cwd-comments/blob/main/icon.png?raw=true
alt: 文档封面