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' },
|
||||
],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user