Skip to content

Commit 2551516

Browse files
committed
📖 补充了一些文档
1 parent dc57342 commit 2551516

File tree

16 files changed

+137
-6558
lines changed

16 files changed

+137
-6558
lines changed

.github/workflows/CI.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,30 @@ jobs:
1919
with:
2020
persist-credentials: false
2121

22+
# 准备环境
23+
- name: use pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 9
27+
2228
# 生成静态文件
2329
- name: Build
2430
env:
2531
NODE_OPTIONS: "--max_old_space_size=4096"
26-
run: npm install && npm run build
27-
32+
run: pnpm install && pnpm build
2833

2934
- name: Deploy to Server
3035
uses: easingthemes/ssh-deploy@v2
3136
env:
3237
SSH_PRIVATE_KEY: ${{ secrets.DWEBUSER_SSHKEY }}
3338
with:
34-
SSH_PRIVATE_KEY: ${{ secrets.DWEBUSER_SSHKEY }}
39+
SSH_PRIVATE_KEY: ${{ secrets.DWEBUSER_SSHKEY }}
3540
REMOTE_HOST: ${{ secrets.SERVER_IP }}
3641
REMOTE_USER: dwebuser
3742
REMOTE_PORT: 18879
38-
SOURCE: docs/.vitepress/dist/ # VitePress 生成的静态文件目录
39-
TARGET: /data/Web/dweb-browser # 服务器上的目标目录
43+
SOURCE: docs/.vitepress/dist/ # VitePress 生成的静态文件目录
44+
TARGET: /data/Web/dweb-browser # 服务器上的目标目录
45+
4046

4147
# - name: 📂Deploy to Server
4248
# uses: easingthemes/ssh-deploy@v2
@@ -47,7 +53,7 @@ jobs:
4753
# local-dir: src/.vuepress/dist/
4854
# port: 21
4955

50-
# 部署到 GitHub Pages
56+
# 部署到 GitHub Pages
5157
# - name: Deploy GitHub Pages
5258
# uses: JamesIves/github-pages-deploy-action@releases/v3
5359
# with:

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ dist
1111
docs/.vitepress/cache
1212
docs/.vitepress/dist
1313

14-
__pycache__
14+
__pycache__
15+
16+
package-lock.json
17+
pnpm-lock.yaml

auto-translater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# 设置翻译的路径
1212
dir_to_translate = "docs"
13-
excluded_dirs = ["en", "es", "ar"] # 替换为你要排除的目录名
13+
excluded_dirs = ["en"] # 替换为你要排除的目录名
1414
translates = ['en'] # 需要翻译成什么语言 当前的模型比较垃圾,没有办法翻译 es 和 ar
1515

1616
# 不进行翻译的文件列表

docs/.vitepress/ar.mts

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

docs/.vitepress/config.mts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { defaultHoverInfoProcessor, transformerTwoslash } from "@shikijs/vitepress-twoslash";
2-
import { groupIconPlugin } from "vitepress-plugin-group-icons";
2+
import { groupIconMdPlugin ,groupIconVitePlugin} from "vitepress-plugin-group-icons";
33
import { defineConfig } from "vitepress";
4-
// import { ar, arSearch } from "./ar.mjs";
5-
import { en, enSearch } from "./en.mjs";
6-
// import { es, esSearch } from "./es.mjs";
7-
import vite from "./vite.config.mjs";
8-
import { zh, zhSearch } from "./zh.mjs";
4+
// import { ar, arSearch } from "./ar.mts";
5+
import { en, enSearch } from "./en.mts";
6+
// import { es, esSearch } from "./es.mts";
7+
import vite from "./vite.config.mts";
8+
import { zh, zhSearch } from "./zh.mts";
99

1010
// https://vitepress.dev/reference/site-config
1111
export default defineConfig({
@@ -19,7 +19,7 @@ export default defineConfig({
1919
dark: "vitesse-dark",
2020
},
2121
config(md) {
22-
md.use(groupIconPlugin)
22+
md.use(groupIconMdPlugin)
2323
},
2424
codeTransformers: [
2525
transformerTwoslash({
@@ -73,5 +73,5 @@ export default defineConfig({
7373
isCustomElement: (tag) => tag === "dweb-wallpaper"
7474
}
7575
}
76-
}
76+
},
7777
});

docs/.vitepress/en.mts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,20 @@ function nav(): DefaultTheme.NavItem[] {
4545
activeMatch: "/server/",
4646
items: navPlugins(sidebarPlaocServer()),
4747
},
48+
// {
49+
// text: "Help Center",
50+
// activeMatch: "/help/",
51+
// items: navPlugins(sidebarHelpServer()),
52+
// },
4853
{
49-
text: "3.x.x",
54+
text: "Contributor",
5055
items: [
5156
{
52-
text: "Monthly",
57+
text: "Monthly Dev Log",
5358
link: "https://github.com/BioforestChain/dweb_browser/blob/main/monthly.md",
5459
},
5560
{
56-
text: "Get Start for Developer",
61+
text: "Get Start for Contributor",
5762
link: "https://github.com/BioforestChain/dweb_browser/blob/main/GET_START_FOR_DEVELOPER.en.md",
5863
},
5964
],
@@ -171,6 +176,18 @@ function sidebarPlaocServer(): DefaultTheme.SidebarItem[] {
171176
},
172177
];
173178
}
179+
function sidebarHelpServer(): DefaultTheme.SidebarItem[] {
180+
return [
181+
{
182+
text: "Help Center",
183+
base: "/help/",
184+
items: [
185+
{ text: "Q & A", link: "q&a" },
186+
{ text: "Privacy Policy", link: "privacy_policy" },
187+
],
188+
},
189+
];
190+
}
174191

175192
export const enSearch: DefaultTheme.AlgoliaSearchOptions["locales"] = {
176193
en: {

0 commit comments

Comments
 (0)