docs: 重构文档配置并添加邮箱提醒功能文档
- 将导航栏和侧边栏配置拆分为单独模块 - 添加邮箱提醒功能文档 - 优化文档配置结构,添加编辑链接和最后更新时间显示 - 从管理后台文档中移除邮箱配置内容,保持功能文档独立
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import nav from './configs/nav';
|
||||
import sidebar from './configs/sidebar';
|
||||
import { defineConfig } from 'vitepress';
|
||||
|
||||
export default defineConfig({
|
||||
title: 'CWD 评论系统文档',
|
||||
description: '基于 Cloudflare Workers 的轻量级评论系统',
|
||||
lang: 'zh-CN',
|
||||
outline: {
|
||||
level: [2, 3, 4],
|
||||
label: 'On this page',
|
||||
},
|
||||
head: [
|
||||
[
|
||||
'link',
|
||||
@@ -18,40 +16,20 @@ export default defineConfig({
|
||||
],
|
||||
],
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{ text: '首页', link: '/' },
|
||||
{ text: '配置', link: '/guide/getting-started' },
|
||||
{ text: 'API', link: '/api/overview' },
|
||||
],
|
||||
|
||||
sidebar: [
|
||||
{
|
||||
text: '快速开始',
|
||||
items: [
|
||||
{ text: '项目介绍', link: '/guide/getting-started' },
|
||||
{ text: '后端配置', link: '/guide/backend-config' },
|
||||
{ text: '前端配置', link: '/guide/frontend-config' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '功能',
|
||||
items: [
|
||||
{ text: '管理后台', link: '/function/admin-panel' },
|
||||
{ text: '数据迁移', link: '/function/data-migration' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'API 文档',
|
||||
items: [
|
||||
{ text: '概览', link: '/api/overview' },
|
||||
{ text: '公开 API', link: '/api/public' },
|
||||
{ text: '管理员 API', link: '/api/admin' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
nav,
|
||||
sidebar,
|
||||
outline: {
|
||||
level: 'deep',
|
||||
label: 'On this page',
|
||||
},
|
||||
editLink: {
|
||||
pattern: 'https://github.com/anghunk/cwd-comments/blob/main/docs/:path',
|
||||
text: '在 GitHub 上编辑此页面',
|
||||
},
|
||||
socialLinks: [{ icon: 'github', link: 'https://github.com/anghunk/cwd-comments' }],
|
||||
|
||||
lastUpdated: true,
|
||||
lastUpdatedText: '最后更新于',
|
||||
footer: {
|
||||
message: '基于 Cloudflare Workers 构建',
|
||||
copyright: 'Copyright © 2026',
|
||||
|
||||
5
docs/.vitepress/configs/nav.js
Normal file
5
docs/.vitepress/configs/nav.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default [
|
||||
{ text: '首页', link: '/' },
|
||||
{ text: '部署文档', link: '/guide/backend-config' },
|
||||
{ text: 'API 文档', link: '/api/overview' },
|
||||
];
|
||||
26
docs/.vitepress/configs/sidebar.js
Normal file
26
docs/.vitepress/configs/sidebar.js
Normal file
@@ -0,0 +1,26 @@
|
||||
export default [
|
||||
{
|
||||
text: '快速开始',
|
||||
items: [
|
||||
{ text: '项目介绍', link: '/guide/getting-started' },
|
||||
{ text: '后端配置', link: '/guide/backend-config' },
|
||||
{ text: '前端配置', link: '/guide/frontend-config' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: '功能',
|
||||
items: [
|
||||
{ text: '管理后台', link: '/function/admin-panel' },
|
||||
{ text: '通知邮箱', link: '/function/email-reminder' },
|
||||
{ text: '数据迁移', link: '/function/data-migration' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'API 文档',
|
||||
items: [
|
||||
{ text: '概览', link: '/api/overview' },
|
||||
{ text: '公开 API', link: '/api/public' },
|
||||
{ text: '管理员 API', link: '/api/admin' },
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -24,16 +24,7 @@
|
||||
|
||||
### 管理员评论密钥
|
||||
|
||||
设置后前台使用管理员邮箱评论需输入此密钥。
|
||||
|
||||
### 邮箱提醒服务
|
||||
|
||||
目前接入了 QQ 邮箱提醒,后续会添加其他邮箱服务。
|
||||
|
||||
1. QQ 邮箱
|
||||
- 登录 QQ 邮箱,进入 `设置 > 账户`
|
||||
- 开启 `POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV 服务`,并获取授权码
|
||||
- 在管理后台设置中配置 QQ 邮箱账号和授权码
|
||||
设置后前台使用管理员邮箱评论需输入此密钥。如果没有经过验证,无法使用管理员邮箱进行评论,进一步避免邮箱被滥用。
|
||||
|
||||
## 使用官方管理后台
|
||||
|
||||
|
||||
9
docs/function/email-reminder.md
Normal file
9
docs/function/email-reminder.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# 通知邮箱
|
||||
|
||||
目前接入了 QQ 邮箱提醒,后续会添加其他邮箱服务。
|
||||
|
||||
### QQ 邮箱
|
||||
|
||||
1. 登录 QQ 邮箱,进入 `设置 > 账户`
|
||||
2. 开启 `POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV 服务`,并获取授权码
|
||||
3. 在管理后台设置中配置 QQ 邮箱账号和授权码
|
||||
Reference in New Issue
Block a user