Skip to content

Commit 1c545d4

Browse files
committed
docs: comprehensive documentation upgrade
Features: - Custom theme with professional styling (custom.css) - Modern home page with Vue component (HomeContent.vue) - Enhanced navigation and sidebar configuration - SEO optimization with Open Graph and Twitter cards - Improved code blocks, tables, and custom blocks styling - Responsive design for mobile devices Styling improvements: - Brand colors and gradients - Feature cards with hover effects - Document grid layout - Statistics section - Print-friendly styles Configuration: - Local search with detailed view - Sitemap generation - Edit links to GitHub - Last updated timestamps
1 parent 6eeeda2 commit 1c545d4

File tree

9 files changed

+948
-203
lines changed

9 files changed

+948
-203
lines changed

docs/.vitepress/components/HomeContent.vue

Lines changed: 424 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
/**
22
* 头部配置
3+
* SEO 优化、社交媒体卡片
34
*/
45

56
export const head = [
6-
['link', { rel: 'icon', href: '/taskflow-ai/favicon.ico' }],
7-
['link', { rel: 'icon', type: 'image/svg+xml', href: '/taskflow-ai/favicon.svg' }],
8-
['meta', { name: 'theme-color', content: '#3c82f6' }],
9-
['meta', { name: 'og:type', content: 'website' }],
10-
['meta', { name: 'og:locale', content: 'zh-CN' }],
11-
['meta', { name: 'og:site_name', content: 'TaskFlow AI' }],
12-
['meta', { name: 'og:image', content: 'https://agions.github.io/taskflow-ai/og-image.png' }],
7+
// Favicon
8+
['link', { rel: 'icon', type: 'image/svg+xml', href: '/taskflow-ai/assets/logo.svg' }],
9+
['link', { rel: 'apple-touch-icon', href: '/taskflow-ai/assets/logo.svg' }],
10+
11+
// SEO Meta
12+
['meta', { name: 'author', content: 'Agions Team' }],
13+
['meta', { name: 'keywords', content: 'TaskFlow AI, AI, Task Management, PRD Parser, MCP, Model Context Protocol, DeepSeek, OpenAI, Claude, Cursor, Windsurf, CLI Tool, TypeScript' }],
14+
15+
// Open Graph
16+
['meta', { property: 'og:type', content: 'website' }],
17+
['meta', { property: 'og:site_name', content: 'TaskFlow AI' }],
18+
['meta', { property: 'og:title', content: 'TaskFlow AI - AI 思维流编排引擎' }],
19+
['meta', { property: 'og:description', content: '从任务执行升级为思维编排 - 专为开发团队打造的下一代 AI 开发工具' }],
20+
['meta', { property: 'og:image', content: 'https://agions.github.io/taskflow-ai/assets/og-image.png' }],
21+
['meta', { property: 'og:url', content: 'https://agions.github.io/taskflow-ai/' }],
22+
23+
// Twitter Card
1324
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
14-
// 强制刷新缓存 - 企业级重构版本
15-
['meta', { name: 'cache-control', content: 'no-cache, no-store, must-revalidate' }],
16-
['meta', { name: 'pragma', content: 'no-cache' }],
17-
['meta', { name: 'expires', content: '0' }],
18-
['meta', { name: 'version', content: 'enterprise-refactor-2024' }]
25+
['meta', { name: 'twitter:title', content: 'TaskFlow AI - AI 思维流编排引擎' }],
26+
['meta', { name: 'twitter:description', content: '从任务执行升级为思维编排 - 专为开发团队打造的下一代 AI 开发工具' }],
27+
['meta', { name: 'twitter:image', content: 'https://agions.github.io/taskflow-ai/assets/og-image.png' }],
28+
29+
// 主题色
30+
['meta', { name: 'theme-color', content: '#3b82f6' }],
31+
['meta', { name: 'msapplication-TileColor', content: '#3b82f6' }],
32+
33+
// Canonical URL
34+
['link', { rel: 'canonical', href: 'https://agions.github.io/taskflow-ai/' }]
1935
];

docs/.vitepress/config-internal/nav.ts

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,48 @@
11
/**
22
* 导航栏配置
3+
* 专业、清晰、层次分明
34
*/
45

56
export const nav = [
6-
{ text: '首页', link: '/' },
7+
{
8+
text: '首页',
9+
link: '/'
10+
},
711
{
812
text: '指南',
913
items: [
1014
{ text: '快速开始', link: '/guide/getting-started' },
1115
{ text: '安装指南', link: '/guide/installation' },
1216
{ text: '基本使用', link: '/guide/basic-usage' },
13-
{ text: '高级功能', link: '/guide/advanced-features' }
17+
{ text: '高级功能', link: '/guide/advanced-features' },
18+
{ text: '系统架构', link: '/guide/architecture' }
1419
]
1520
},
1621
{
17-
text: 'API参考',
22+
text: 'API 参考',
1823
items: [
19-
{ text: 'API概览', link: '/api/' },
20-
{ text: '配置管理', link: '/api/config-manager' },
21-
{ text: 'PRD解析器', link: '/api/prd-parser' },
24+
{ text: 'API 概览', link: '/api/' },
25+
{ text: 'AI 编排器', link: '/api/ai-orchestrator' },
26+
{ text: '配置管理器', link: '/api/config-manager' },
27+
{ text: 'PRD 解析器', link: '/api/prd-parser' },
2228
{ text: '任务管理器', link: '/api/task-manager' },
23-
{ text: 'AI编排器', link: '/api/ai-orchestrator' }
29+
{ text: '完整 API', link: '/api-reference' }
2430
]
2531
},
2632
{
27-
text: '用户手册',
33+
text: '集成',
2834
items: [
29-
{ text: '用户指南', link: '/user-guide/user-manual' },
30-
{ text: 'CLI命令', link: '/user-guide/cli-commands' },
31-
{ text: '最佳实践', link: '/user-guide/best-practices' },
32-
{ text: '工作流程', link: '/user-guide/workflows' }
35+
{ text: 'MCP 配置', link: '/guide/mcp-setup' },
36+
{ text: 'Cursor', link: '/editor-config/cursor' },
37+
{ text: 'Windsurf/Trae', link: '/editor-config/windsurf-trae-integration' },
38+
{ text: '编辑器概览', link: '/editor-config/overview' }
3339
]
3440
},
3541
{
36-
text: '技术参考',
42+
text: '参考',
3743
items: [
44+
{ text: 'CLI 命令', link: '/reference/cli' },
3845
{ text: '配置选项', link: '/reference/configuration' },
39-
{ text: 'CLI参考', link: '/reference/cli' },
4046
{ text: '环境变量', link: '/reference/environment' },
4147
{ text: '错误代码', link: '/reference/error-codes' }
4248
]
@@ -48,6 +54,7 @@ export const nav = [
4854
{ text: '故障排除', link: '/troubleshooting/common-issues' },
4955
{ text: '更新日志', link: '/changelog' },
5056
{ text: '贡献指南', link: '/development/contributing' },
57+
{ text: '─'.repeat(12), link: '' },
5158
{ text: 'GitHub', link: 'https://github.com/agions/taskflow-ai' },
5259
{ text: 'NPM', link: 'https://www.npmjs.com/package/taskflow-ai' }
5360
]

docs/.vitepress/config-internal/sidebar.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/**
22
* 侧边栏配置
3+
* 清晰的层次结构,便于导航
34
*/
45

56
export const sidebar = {
7+
// 指南
68
'/guide/': [
79
{
810
text: '🚀 快速入门',
@@ -33,6 +35,7 @@ export const sidebar = {
3335
}
3436
],
3537

38+
// API 参考
3639
'/api/': [
3740
{
3841
text: '📚 API 概览',
@@ -66,6 +69,7 @@ export const sidebar = {
6669
}
6770
],
6871

72+
// 编辑器配置
6973
'/editor-config/': [
7074
{
7175
text: '🔌 编辑器集成',
@@ -78,6 +82,7 @@ export const sidebar = {
7882
}
7983
],
8084

85+
// 用户指南
8186
'/user-guide/': [
8287
{
8388
text: '📖 用户手册',
@@ -91,6 +96,7 @@ export const sidebar = {
9196
}
9297
],
9398

99+
// 技术参考
94100
'/reference/': [
95101
{
96102
text: '📙 技术参考',
@@ -104,6 +110,7 @@ export const sidebar = {
104110
}
105111
],
106112

113+
// 开发文档
107114
'/development/': [
108115
{
109116
text: '💻 开发文档',
@@ -115,6 +122,7 @@ export const sidebar = {
115122
}
116123
],
117124

125+
// 测试
118126
'/testing/': [
119127
{
120128
text: '🧪 测试指南',
@@ -125,6 +133,7 @@ export const sidebar = {
125133
}
126134
],
127135

136+
// 部署
128137
'/deployment/': [
129138
{
130139
text: '🚀 部署指南',
@@ -135,6 +144,7 @@ export const sidebar = {
135144
}
136145
],
137146

147+
// 故障排除
138148
'/troubleshooting/': [
139149
{
140150
text: '🔧 故障排除',
@@ -148,6 +158,7 @@ export const sidebar = {
148158
}
149159
],
150160

161+
// MCP
151162
'/mcp/': [
152163
{
153164
text: '🔌 MCP 集成',

docs/.vitepress/config-internal/theme.ts

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
22
* 主题配置
3+
* 专业、现代、用户友好
34
*/
45

56
export const themeConfig = {
@@ -9,20 +10,36 @@ export const themeConfig = {
910

1011
// 社交链接
1112
socialLinks: [
12-
{ icon: 'github', link: 'https://github.com/agions/taskflow-ai' },
13-
{ icon: { svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12 1.608l-9.9 4.02v10.392l9.9 4.372 9.9-4.372V5.628L12 1.608zm0 2.19l7.2 2.928v7.348L12 16.698l-7.2-2.624V6.726L12 3.798z"/></svg>' }, link: 'https://www.npmjs.com/package/taskflow-ai' }
13+
{
14+
icon: 'github',
15+
link: 'https://github.com/agions/taskflow-ai'
16+
},
17+
{
18+
icon: {
19+
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12 1.608l-9.9 4.02v10.392l9.9 4.372 9.9-4.372V5.628L12 1.608zm0 2.19l7.2 2.928v7.348L12 16.698l-7.2-2.624V6.726L12 3.798z"/></svg>'
20+
},
21+
link: 'https://www.npmjs.com/package/taskflow-ai'
22+
}
1423
],
1524

1625
// 页脚
1726
footer: {
18-
message: 'Released under the MIT License.',
19-
copyright: 'Copyright © 2025 Agions'
27+
message: '基于 MIT 协议发布 | Made with ❤️ by Agions',
28+
copyright: 'Copyright © 2025-2026 Agions Team'
2029
},
2130

22-
// 搜索
31+
// 本地搜索
2332
search: {
2433
provider: 'local',
2534
options: {
35+
detailedView: true,
36+
miniSearch: {
37+
searchOptions: {
38+
fuzzy: 0.2,
39+
prefix: true,
40+
boost: { title: 4, text: 2, titles: 1 }
41+
}
42+
},
2643
translations: {
2744
button: {
2845
buttonText: '搜索文档',
@@ -44,30 +61,38 @@ export const themeConfig = {
4461
// 编辑链接
4562
editLink: {
4663
pattern: 'https://github.com/agions/taskflow-ai/edit/main/docs/:path',
47-
text: '在 GitHub 上编辑此页'
64+
text: '✏️ 在 GitHub 上编辑此页'
4865
},
4966

5067
// 最后更新时间
5168
lastUpdated: {
5269
text: '最后更新于',
5370
formatOptions: {
54-
dateStyle: 'short',
55-
timeStyle: 'medium'
71+
dateStyle: 'medium',
72+
timeStyle: 'short'
5673
}
5774
},
5875

5976
// 文档页脚导航
6077
docFooter: {
61-
prev: '上一页',
62-
next: '下一页'
78+
prev: '上一页',
79+
next: '下一页'
6380
},
6481

6582
// 大纲配置
6683
outline: {
6784
level: [2, 3],
68-
label: '页面导航'
85+
label: '📑 目录'
6986
},
7087

7188
// 返回顶部
72-
returnToTopLabel: '返回顶部'
89+
returnToTopLabel: '↑ 返回顶部',
90+
91+
// 侧边栏菜单标签
92+
sidebarMenuLabel: '菜单',
93+
94+
// 深色模式切换标签
95+
darkModeSwitchLabel: '主题',
96+
lightModeSwitchTitle: '切换到浅色模式',
97+
darkModeSwitchTitle: '切换到深色模式'
7398
};

docs/.vitepress/config.ts

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,28 @@ import { defineConfig } from 'vitepress'
22
import { nav, sidebar, themeConfig, head, vite, markdown } from './config-internal'
33

44
export default defineConfig({
5+
// 站点信息
56
title: 'TaskFlow AI',
7+
titleTemplate: ':title | TaskFlow AI',
68
description: 'TaskFlow AI - 智能PRD文档解析与任务管理助手,专为开发团队设计的AI驱动任务编排工具',
79

8-
// GitHub Pages 优化配置
10+
// 部署配置
911
base: '/taskflow-ai/',
1012
lang: 'zh-CN',
13+
14+
// 构建配置
1115
cleanUrls: false,
1216
ignoreDeadLinks: true,
1317
lastUpdated: true,
14-
15-
// 确保资源正确加载
18+
19+
// 资源配置
1620
assetsDir: 'assets',
1721
cacheDir: '.vitepress/cache',
1822

1923
// 主题配置
24+
themeConfig,
25+
26+
// 导航和侧边栏
2027
themeConfig: {
2128
...themeConfig,
2229
nav,
@@ -29,11 +36,30 @@ export default defineConfig({
2936
// 头部配置
3037
head,
3138

32-
// Markdown配置
39+
// Markdown 配置
3340
markdown,
3441

3542
// 站点地图
3643
sitemap: {
37-
hostname: 'https://agions.github.io/taskflow-ai/'
44+
hostname: 'https://agions.github.io/taskflow-ai/',
45+
lastmodDateOnly: true
46+
},
47+
48+
// 多语言支持 (预留)
49+
locales: {
50+
root: {
51+
label: '简体中文',
52+
lang: 'zh-CN'
53+
}
54+
},
55+
56+
// 构建钩子
57+
transformHead({ pageData }) {
58+
const frontmatter = pageData.frontmatter
59+
if (frontmatter.title) {
60+
return [
61+
['title', `${frontmatter.title} | TaskFlow AI`]
62+
]
63+
}
3864
}
3965
})

0 commit comments

Comments
 (0)