Skip to content

Commit 097bbf0

Browse files
authored
Merge pull request #10 from hyt1004/main
调整样式,增加时序图
2 parents 4e9cc64 + b5005e7 commit 097bbf0

19 files changed

+1621
-56
lines changed

docs/.vitepress/config.mts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { defineConfig } from "vitepress";
1+
// import { defineConfig } from "vitepress";
2+
import { withMermaid } from "vitepress-plugin-mermaid";
23
import { Chapters, getChapterItems } from "./theme/constrants/route";
34
import autoH1 from "./plugins/autoH1";
45

56
// 限制sidebar最多深入两层章节
67
const sidebarItems = getChapterItems(1, 2);
78

89
// https://vitepress.dev/reference/site-config
9-
export default defineConfig({
10+
export default withMermaid({
1011
lang: "zh",
1112
title: "灵矽文档中心",
1213
description: "A 灵矽 Documentation Project",
@@ -22,7 +23,7 @@ export default defineConfig({
2223
{ text: "API", link: Chapters.xrobot_api },
2324
{ text: "MCP接入", link: Chapters.xrobot_mcp },
2425
{ text: "最佳实践", link: Chapters.xrobot_guide },
25-
{ text: "FAQ", link: Chapters.xrobot_faq },
26+
{ text: "FAQ", link: Chapters.xrobot_faq + "faq/" },
2627
],
2728
sidebar: sidebarItems,
2829
socialLinks: [
@@ -32,8 +33,8 @@ export default defineConfig({
3233
},
3334
],
3435
search: {
35-
provider: 'local',
36-
}
36+
provider: "local",
37+
},
3738
},
3839
markdown: {
3940
toc: {

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ const items_xrobot_platform = [
7676
link: Chapters.xrobot_platform,
7777
collapsed: true,
7878
items: [
79-
{ text: "OTA", link: "OTA" },
80-
{ text: "websocket", link: "websocket" },
79+
{ text: "OTA 网关", link: "OTA" },
80+
{ text: "WebSocket", link: "websocket" },
8181
{ text: "MQTT", link: "MQTT" },
8282
].map((item) => apply_prefix(item, Chapters.xrobot_platform)),
8383
},
@@ -105,9 +105,7 @@ const items_xrobot_mcp = [
105105
items: [
106106
// { text: "硬件MCP", link: "hardware-mcp" },
107107
// { text: "软件MCP", link: "software-mcp" },
108-
].map((item) =>
109-
apply_prefix(item, Chapters.xrobot_mcp)
110-
),
108+
].map((item) => apply_prefix(item, Chapters.xrobot_mcp)),
111109
},
112110
];
113111

docs/.vitepress/theme/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
margin: auto;
2626
}
2727

28+
/* 主页 */
29+
div.home #local-search button {
30+
display: none;
31+
}
32+
2833
/* todo 移除测试背景-该背景被应用到整个页面 */
2934
/* div[class="VPContent is-home"] {
3035
background: linear-gradient(to bottom right, #dce8ff, #e4eeff, #e6cbfd);

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ features:
4141
dark: /icons/dark/faq.svg
4242
width: 100
4343
height: 100
44-
link: ./xrobot/faq
44+
link: ./xrobot/faq/faq/
4545
- linkText: 去体验
4646
icon:
4747
light: /icons/light/experience.svg
14.7 KB
Loading
10.4 KB
Loading
20.2 KB
Loading
45.9 KB
Loading
10.7 KB
Loading
4.63 KB
Loading

0 commit comments

Comments
 (0)