Skip to content

Commit e059ff4

Browse files
committed
更新图片
1 parent ddd2e91 commit e059ff4

File tree

8 files changed

+30
-17
lines changed

8 files changed

+30
-17
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 安装
44

5-
``` shell
5+
```shell
66
npm install
77
```
88

@@ -11,15 +11,15 @@ npm install
1111
```shell
1212
npm run docs:dev
1313
```
14-
浏览器打开 http://localhost:5173
14+
浏览器打开 <http://localhost:5173>
1515

1616
## 部署
1717

1818
```shell
1919
npm run docs:build
2020
```
2121

22-
本地预览,执行下列命令后,生成一个本地静态 Web 服务 http://localhost:4173,该服务以 .vitepress/dist 作为源文件
22+
本地预览,执行下列命令后,生成一个本地静态 Web 服务 <http://localhost:4173>,该服务以 .vitepress/dist 作为源文件
2323
```shell
2424
npm run docs:preview
2525
```

docs/.vitepress/config.mts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,28 @@ export default defineConfig({
4141
},
4242
],
4343
search: {
44-
provider: "local",
45-
},
44+
provider: 'local',
45+
options: {
46+
locales: {
47+
zh: {
48+
translations: {
49+
button: {
50+
buttonText: '搜索文档',
51+
buttonAriaLabel: '搜索文档'
52+
},
53+
modal: {
54+
noResultsText: '无法找到相关结果',
55+
resetButtonTitle: '清除查询条件',
56+
footer: {
57+
selectText: '选择',
58+
navigateText: '切换'
59+
}
60+
}
61+
}
62+
}
63+
}
64+
}
65+
}
4666
},
4767
markdown: {
4868
toc: {

docs/.vitepress/theme/components/ChapterContents.vue

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
<script setup lang="ts">
22
import { useData } from "vitepress";
33
import {
4+
ChapterItem,
45
ChapterItems,
56
Chapters,
67
isChapter,
78
} from "../../../.vitepress/theme/constrants/route";
8-
9-
function apply_prefix(link: string, prefix: string) {
10-
if (!prefix) return link;
11-
if (link.startsWith("/") && prefix.endsWith("/")) {
12-
return prefix.slice(0, -1) + link;
13-
} else if (!link.startsWith("/") && !prefix.endsWith("/")) {
14-
return prefix + "/" + link;
15-
}
16-
return prefix + link;
17-
}
9+
import { apply_prefix } from "../utils";
1810
1911
const { chapter: chapter_root, root = true } = defineProps<{
2012
// 参数chapter应该是如 Chapter.xrobot_device这样的
@@ -28,12 +20,13 @@ const base = site.value.base;
2820
2921
// console.log("contents");
3022
let chapter_name: string[] = [];
31-
let tocs: { link: string; text: string }[][] = [];
23+
let tocs: ChapterItem[][] = [];
3224
3325
// console.log("chapter_root", chapter_root);
3426
// console.log("ChapterItems[chapter_root]", ChapterItems[chapter_root]);
3527
36-
const items = ChapterItems[chapter_root];
28+
const items: ChapterItem[] = ChapterItems[chapter_root];
29+
3730
if (!items) {
3831
const { page } = useData();
3932
console.warn(

docs/public/icons/API.png

-95 Bytes
Loading
814 Bytes
Loading

docs/public/icons/faq.png

90 Bytes
Loading

docs/public/icons/mcp.png

-79 Bytes
Loading

docs/public/icons/protocol.png

-211 Bytes
Loading

0 commit comments

Comments
 (0)