Skip to content

Commit 7cffcb0

Browse files
committed
配置markdownlint,调整guide内容的页面位置到最佳实践下,并相应调整路由
1 parent fbff17b commit 7cffcb0

File tree

118 files changed

+90
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+90
-78
lines changed

.markdownlint.jsonc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"no-reversed-links": false,
3+
"line-length": false,
4+
"no-inline-html": false
5+
}

docs/.vitepress/config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default defineConfig({
2626
outline: [2, 4],
2727
nav: [
2828
{ text: "主页", link: "/" },
29-
{ text: "使用文档", link: Chapters.xrobot_guide_device },
29+
// { text: "使用文档", link: Chapters.xrobot_guide_device },
3030
{ text: "API参考", link: Chapters.xrobot_api },
3131
{ text: "最佳实践: ESP32 接入", link: Chapters.xrobot_platform_esp32 },
3232
{ text: "FAQ", link: Chapters.xrobot_faq },

docs/.vitepress/theme/constrants/route.ts

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ export enum Chapters {
2020
xrobot = "/xrobot/",
2121
// guide
2222
xrobot_guide = "/xrobot/guide/",
23-
xrobot_guide_mp = "/xrobot/guide/mini-program/",
24-
xrobot_guide_device = "/xrobot/guide/device/",
25-
xrobot_guide_console = "/xrobot/guide/console/",
26-
xrobot_guide_net_config = "/xrobot/guide/net-config/",
2723
// api
2824
xrobot_api = "/xrobot/api/",
2925
xrobot_api_server = "/xrobot/api/server/",
@@ -32,6 +28,11 @@ export enum Chapters {
3228
// platform
3329
xrobot_platform = "/xrobot/platform/",
3430
xrobot_platform_esp32 = "/xrobot/platform/esp32/",
31+
xrobot_platform_others = "/xrobot/platform/others/",
32+
xrobot_platform_others_mp = "/xrobot/platform/others/mini-program/",
33+
xrobot_platform_others_device = "/xrobot/platform/others/device/",
34+
xrobot_platform_others_console = "/xrobot/platform/others/console/",
35+
xrobot_platform_others_net_config = "/xrobot/platform/others/net-config/",
3536
// faq
3637
xrobot_faq = "/xrobot/faq/",
3738
}
@@ -123,51 +124,51 @@ export const items_xrobot_api = [
123124
},
124125
];
125126

126-
export const items_xrobot_guide_mp = [
127+
export const items_xrobot_platform_mp = [
127128
{
128129
text: "微信小程序",
129-
link: Chapters.xrobot_guide_mp,
130+
link: Chapters.xrobot_platform_others_mp,
130131
collapsed: true,
131132
items: [
132133
{ text: "智能体管理", link: "agent-management" },
133134
{ text: "角色配置", link: "role-config" },
134135
{ text: "设备管理", link: "device-management" },
135136
{ text: "设备配网", link: "device-net-config" },
136-
].map((item) => apply_prefix(item, Chapters.xrobot_guide_mp)),
137+
].map((item) => apply_prefix(item, Chapters.xrobot_platform_others_mp)),
137138
},
138139
];
139140

140-
export const items_xrobot_guide_device = [
141+
export const items_xrobot_platform_device = [
141142
{
142143
text: "设备配置与使用",
143-
link: Chapters.xrobot_guide_device,
144+
link: Chapters.xrobot_platform_others_device,
144145
collapsed: true,
145146
items: [
146147
{ text: "使用指南", link: "device-intro" },
147148
{ text: "绑定", link: "device-bind" },
148149
{ text: "智能体连接指南", link: "device-connection" },
149-
].map((item) => apply_prefix(item, Chapters.xrobot_guide_device)),
150+
].map((item) => apply_prefix(item, Chapters.xrobot_platform_others_device)),
150151
},
151152
];
152153

153-
const items_xrobot_guide_console = [
154+
const items_xrobot_platform_console = [
154155
{
155156
text: "控制台(智控台)",
156-
link: Chapters.xrobot_guide_console,
157+
link: Chapters.xrobot_platform_others_console,
157158
collapsed: true,
158159
items: [{ text: "example", link: "" }].map((item) =>
159-
apply_prefix(item, Chapters.xrobot_guide_console)
160+
apply_prefix(item, Chapters.xrobot_platform_others_console)
160161
),
161162
},
162163
];
163164

164-
const items_xrobot_guide_net_config = [
165+
const items_xrobot_platform_net_config = [
165166
{
166167
text: "配网",
167-
link: Chapters.xrobot_guide_net_config,
168+
link: Chapters.xrobot_platform_others_net_config,
168169
collapsed: true,
169170
items: [{ text: "通过微信小程序", link: "mp" }].map((item) =>
170-
apply_prefix(item, Chapters.xrobot_guide_net_config)
171+
apply_prefix(item, Chapters.xrobot_platform_others_net_config)
171172
),
172173
},
173174
];
@@ -190,13 +191,13 @@ const items_xrobot_platform_esp32 = [
190191
const items_xrobot_platform_others = [
191192
{
192193
text: "厂商接入指南",
193-
link: Chapters.xrobot_guide,
194+
link: Chapters.xrobot_platform,
194195
collapsed: true,
195196
items: [
196-
...items_xrobot_guide_mp,
197-
...items_xrobot_guide_device,
198-
...items_xrobot_guide_console,
199-
...items_xrobot_guide_net_config,
197+
...items_xrobot_platform_mp,
198+
...items_xrobot_platform_device,
199+
...items_xrobot_platform_console,
200+
...items_xrobot_platform_net_config,
200201
],
201202
},
202203
];
@@ -263,31 +264,37 @@ export const ChapterItems: Record<Chapters, ChapterItem[]> = {
263264
],
264265
// guide
265266
[Chapters.xrobot_guide]: [gobackItem(Chapters.xrobot), ...items_xrobot_guide],
266-
[Chapters.xrobot_guide_mp]: [
267-
gobackItem(Chapters.xrobot_guide),
268-
...items_xrobot_guide_mp,
269-
],
270-
[Chapters.xrobot_guide_device]: [
271-
gobackItem(Chapters.xrobot_guide),
272-
...items_xrobot_guide_device,
273-
],
274-
[Chapters.xrobot_guide_console]: [
275-
gobackItem(Chapters.xrobot_guide),
276-
...items_xrobot_guide_console,
277-
],
278-
[Chapters.xrobot_guide_net_config]: [
279-
gobackItem(Chapters.xrobot_guide),
280-
...items_xrobot_guide_net_config,
281-
],
282267
// platform
283268
[Chapters.xrobot_platform]: [
284269
gobackItem(Chapters.xrobot),
285270
...items_xrobot_platform,
286271
],
272+
// - esp32
287273
[Chapters.xrobot_platform_esp32]: [
288274
gobackItem(Chapters.xrobot_platform),
289275
...items_xrobot_platform_esp32,
290276
],
277+
// - others
278+
[Chapters.xrobot_platform_others]: [
279+
gobackItem(Chapters.xrobot_platform),
280+
...items_xrobot_platform_others,
281+
],
282+
[Chapters.xrobot_platform_others_mp]: [
283+
gobackItem(Chapters.xrobot_platform_others),
284+
...items_xrobot_platform_mp,
285+
],
286+
[Chapters.xrobot_platform_others_device]: [
287+
gobackItem(Chapters.xrobot_platform_others),
288+
...items_xrobot_platform_device,
289+
],
290+
[Chapters.xrobot_platform_others_console]: [
291+
gobackItem(Chapters.xrobot_platform_others),
292+
...items_xrobot_platform_console,
293+
],
294+
[Chapters.xrobot_platform_others_net_config]: [
295+
gobackItem(Chapters.xrobot_platform_others),
296+
...items_xrobot_platform_net_config,
297+
],
291298
// faq
292299
[Chapters.xrobot_faq]: [gobackItem(Chapters.xrobot), ...items_xrobot_faq],
293300
};

docs/xrobot/guide/console/index.md

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

docs/xrobot/guide/device/index.md

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

docs/xrobot/guide/mini-program/index.md

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

docs/xrobot/guide/net-config/index.md

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

docs/xrobot/guide/net-config/mp.md

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

0 commit comments

Comments
 (0)