Skip to content

Commit 9152d6b

Browse files
committed
docs:重构文档结构并优化内容
- 修改侧边栏导航结构,使文档层次更清晰- 更新 API 文档,按功能分类重新组织内容 - 新增使用指南和高级应用示例,提升文档实用性 - 调整文档标题和描述,使其更加友好和易于理解
1 parent d6f4dee commit 9152d6b

7 files changed

Lines changed: 1241 additions & 2163 deletions

File tree

.vitepress/config.mts

Lines changed: 59 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default defineConfig({
3737
{
3838
text: '开始使用',
3939
items: [
40-
{ text: '快速开始', link: '/guide/quick-start' },
40+
{ text: '5分钟快速上手', link: '/guide/quick-start' },
4141
{ text: '安装配置', link: '/guide/installation' },
4242
{ text: '基础概念', link: '/guide/concepts' }
4343
]
@@ -60,70 +60,90 @@ export default defineConfig({
6060
],
6161
'/api/': [
6262
{
63-
text: '核心类型',
63+
text: '快速索引',
6464
items: [
65-
{ text: 'Node', link: '/api/#node' },
66-
{ text: 'NodeType', link: '/api/#nodetype' }
65+
{ text: '核心解析函数', link: '/api/#核心解析函数' },
66+
{ text: '基础数据访问', link: '/api/#基础数据访问' },
67+
{ text: '类型转换方法', link: '/api/#类型转换方法' },
68+
{ text: '数组操作', link: '/api/#数组操作' },
69+
{ text: '对象操作', link: '/api/#对象操作' },
70+
{ text: '高级功能', link: '/api/#高级功能' }
6771
]
6872
},
6973
{
70-
text: '包级函数',
74+
text: '解析和访问',
7175
items: [
72-
{ text: '解析函数', link: '/api/#解析函数' },
73-
{ text: '序列化函数', link: '/api/#序列化函数' },
74-
{ text: '解码函数', link: '/api/#解码函数' }
76+
{ text: 'FromString / FromBytes', link: '/api/#fromstring' },
77+
{ text: 'Get / GetPath', link: '/api/#get' },
78+
{ text: 'Index / Exists', link: '/api/#index' }
7579
]
7680
},
7781
{
78-
text: 'Node 方法',
79-
collapsed: false,
82+
text: '数据转换',
8083
items: [
81-
{ text: '访问方法', link: '/api/#访问方法' },
82-
{ text: '类型转换', link: '/api/#类型转换方法' },
83-
{ text: '便捷方法', link: '/api/#便捷方法带默认值' },
84+
{ text: '安全转换 (推荐)', link: '/api/#安全转换方法推荐' },
85+
{ text: '严格转换', link: '/api/#严格转换方法' },
86+
{ text: '切片转换', link: '/api/#toslice系列方法' }
87+
]
88+
},
89+
{
90+
text: '遍历和检查',
91+
items: [
92+
{ text: '数组遍历', link: '/api/#arrayforeach' },
93+
{ text: '对象遍历', link: '/api/#foreach' },
8494
{ text: '类型检查', link: '/api/#类型检查方法' },
85-
{ text: '遍历方法', link: '/api/#遍历方法' },
86-
{ text: '数据转换', link: '/api/#数据转换方法' },
87-
{ text: '数据验证', link: '/api/#数据验证方法' },
88-
{ text: '类型信息', link: '/api/#类型信息方法' },
89-
{ text: '原始数据', link: '/api/#原始数据方法' },
90-
{ text: 'JSON序列化', link: '/api/#json序列化方法' },
91-
{ text: '字符串操作', link: '/api/#字符串操作方法' },
92-
{ text: '数组操作', link: '/api/#数组操作方法' },
93-
{ text: '对象操作', link: '/api/#对象操作方法' },
94-
{ text: '批量获取', link: '/api/#批量获取方法' },
95-
{ text: '查找和过滤', link: '/api/#查找和过滤方法' },
96-
{ text: '统计和分析', link: '/api/#统计和分析方法' },
97-
{ text: '比较和状态检查', link: '/api/#比较和状态检查方法' },
98-
{ text: '数字操作', link: '/api/#数字操作方法' },
99-
{ text: '高级查询', link: '/api/#高级查询方法' },
100-
{ text: '其他方法', link: '/api/#其他方法' }
95+
{ text: '深度遍历', link: '/api/#walk' }
10196
]
10297
},
10398
{
104-
text: '配置选项',
99+
text: '验证和序列化',
105100
items: [
106-
{ text: 'ParseOptions', link: '/api/#parseoptions' },
107-
{ text: 'SerializeOptions', link: '/api/#serializeoptions' }
101+
{ text: '数据验证', link: '/api/#数据验证' },
102+
{ text: '结构体操作', link: '/api/#结构体操作' },
103+
{ text: '配置选项', link: '/api/#配置选项' }
108104
]
109105
},
110106
{
111-
text: '示例',
107+
text: '使用指南',
112108
items: [
113-
{ text: '完整使用示例', link: '/api/#完整使用示例' },
114-
{ text: '性能相关', link: '/api/#性能相关' },
115-
{ text: '使用建议', link: '/api/#使用建议' }
109+
{ text: '性能特性', link: '/api/#性能特性' },
110+
{ text: '错误处理', link: '/api/#错误处理指南' },
111+
{ text: '最佳实践', link: '/api/#最佳实践' }
116112
]
117113
}
118114
],
119115
'/examples/': [
120116
{
121-
text: '示例导航',
117+
text: '基础示例',
118+
items: [
119+
{ text: '用户信息解析', link: '/examples/#示例-1-用户信息解析' },
120+
{ text: '嵌套数据访问', link: '/examples/#示例-2-嵌套数据访问' }
121+
]
122+
},
123+
{
124+
text: '数组和对象',
122125
items: [
123-
{ text: '快速开始', link: '/examples/' }
126+
{ text: '商品列表处理', link: '/examples/#示例-3-商品列表处理' },
127+
{ text: '成绩统计分析', link: '/examples/#示例-4-成绩统计分析' },
128+
{ text: '部门员工统计', link: '/examples/#示例-5-部门员工统计' }
124129
]
125130
},
126-
131+
{
132+
text: 'API 处理',
133+
items: [
134+
{ text: '分页数据处理', link: '/examples/#示例-6-分页数据处理' },
135+
{ text: '错误响应处理', link: '/examples/#示例-7-错误响应处理' },
136+
{ text: '配置文件解析', link: '/examples/#示例-8-应用配置管理' }
137+
]
138+
},
139+
{
140+
text: '高级应用',
141+
items: [
142+
{ text: '数据验证', link: '/examples/#示例-9-用户注册验证' },
143+
{ text: '性能优化', link: '/examples/#示例-10-大数据处理优化' },
144+
{ text: '微服务配置', link: '/examples/#示例-12-微服务配置中心' }
145+
]
146+
}
127147
],
128148
'/performance/': [
129149
{

README.md

Lines changed: 0 additions & 194 deletions
This file was deleted.

0 commit comments

Comments
 (0)