Skip to content

Commit 0a9f8cf

Browse files
committed
add docs path
1 parent d45319e commit 0a9f8cf

File tree

1,049 files changed

+1590
-1590
lines changed

Some content is hidden

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

1,049 files changed

+1590
-1590
lines changed

docs/.vuepress/components/PlatformSwitch.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ const platformIcon = computed(() => PLATFORM_ICON_MAP[platform.value]?.activeIco
5959
const route = useRoute()
6060
const router = useRouter()
6161
watch(()=>route.path, ()=> {
62-
if (route.path.indexOf('/document') == 0) {
63-
platform.value = route.path.split('/')[2]
62+
if (route.path.indexOf('/docs/sdk') == 0) {
63+
platform.value = route.path.split('/')[3]
6464
}
6565
}, {immediate:true})
6666
6767
6868
// 切换平台,如果有相同路径的route就直接跳转
6969
const onChange = (platform) => {
70-
const nextPlatformDocRouters = router.options.routes.filter(item=>item.hasOwnProperty('name') && item?.path.indexOf('/document/'+platform) == 0).map(item=>item.path)
70+
const nextPlatformDocRouters = router.options.routes.filter(item=>item.hasOwnProperty('name') && item?.path.indexOf('/docs/sdk/'+platform) == 0).map(item=>item.path)
7171
7272
let newPath = route.path.split('/')
73-
newPath[2] = platform
73+
newPath[3] = platform
7474
const nextPathPath = newPath.join('/')
7575
7676
if (nextPlatformDocRouters.indexOf(nextPathPath) > -1) {
7777
router.push(nextPathPath)
7878
} else {
79-
router.push('/document/'+platform+'/overview.html')
79+
router.push('/docs/sdk/'+platform+'/overview.html')
8080
}
8181
}
8282

docs/.vuepress/components/Sidebar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
watch(pageData, ()=> {
1414
const pagePath = pageData.value.path
1515
showPrivateSwitch.value = pagePath.indexOf('/private/') == 0
16-
showPlatformSwitch.value = pagePath.indexOf('/document/') == 0
17-
showUIKitSwitch.value = pagePath.indexOf('/uikit/') == 0
16+
showPlatformSwitch.value = pagePath.indexOf('/docs/sdk/') == 0
17+
showUIKitSwitch.value = pagePath.indexOf('/docs/uikit/') == 0
1818
}, {immediate:true})
1919
2020

docs/.vuepress/components/UIKitSwitch.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ const router = useRouter();
8888
watch(
8989
() => route.path,
9090
() => {
91-
if (route.path.indexOf("/uikit") == 0) {
91+
if (route.path.indexOf("/docs/uikit") == 0) {
9292
const splitRoute = route.path.split("/");
93-
kitType.value = splitRoute[2];
94-
platform.value = splitRoute[3];
93+
kitType.value = splitRoute[3];
94+
platform.value = splitRoute[4];
9595
}
9696
},
9797
{ immediate: true }
@@ -103,7 +103,7 @@ const onChange = (platform) => {
103103
.filter(
104104
(item) =>
105105
item.hasOwnProperty("name") &&
106-
item?.path.indexOf(`/uikit/${kitType.value}/${platform}`) == 0
106+
item?.path.indexOf(`/docs/uikit/${kitType.value}/${platform}`) == 0
107107
)
108108
.map((item) => item.path);
109109
@@ -116,12 +116,12 @@ const onChange = (platform) => {
116116
} else {
117117
if (kitType.value == "chatuikit") {
118118
router.push(
119-
`/uikit/${kitType.value}/${platform}/chatuikit_overview.html`
119+
`/docs/uikit/${kitType.value}/${platform}/chatuikit_overview.html`
120120
);
121121
}
122122
if (kitType.value == "chatroomuikit") {
123123
router.push(
124-
`/uikit/${kitType.value}/${platform}/roomuikit_overview.html`
124+
`/docs/uikit/${kitType.value}/${platform}/roomuikit_overview.html`
125125
);
126126
}
127127
}

docs/.vuepress/navbar/index.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@ export const zhNavbar = navbar([
1111
{
1212
text: 'Android',
1313
icon: '/icon-Android.svg',
14-
link: '/uikit/chatuikit/android/chatuikit_overview.html'
14+
link: '/docs/uikit/chatuikit/android/chatuikit_overview.html'
1515
},
1616
{
1717
text: 'iOS',
1818
icon: '/icon-iOS.svg',
19-
link: '/uikit/chatuikit/ios/chatuikit_overview.html'
19+
link: '/docs/uikit/chatuikit/ios/chatuikit_overview.html'
2020
},
2121
{
2222
text: 'Web',
2323
icon: '/icon-web.svg',
24-
link: '/uikit/chatuikit/web/chatuikit_overview.html'
24+
link: '/docs/uikit/chatuikit/web/chatuikit_overview.html'
2525
},
2626
// {
2727
// text: 'Uniapp',
2828
// icon: '/icon-uni-app.svg',
29-
// link: '/uikit/chatuikit/uniapp/chatuikit_overview.html'
29+
// link: '/docs/uikit/chatuikit/uniapp/chatuikit_overview.html'
3030
// },
3131
{
3232
text: 'React Native',
3333
icon: '/icon-ReactNative.svg',
34-
link: '/uikit/chatuikit/react-native/chatuikit_overview.html'
34+
link: '/docs/uikit/chatuikit/react-native/chatuikit_overview.html'
3535
},
3636
{
3737
text: 'Flutter',
3838
icon: '/icon-flutter.svg',
39-
link: '/uikit/chatuikit/flutter/chatuikit_overview.html'
39+
link: '/docs/uikit/chatuikit/flutter/chatuikit_overview.html'
4040
}
4141
]
4242
},
@@ -46,27 +46,27 @@ export const zhNavbar = navbar([
4646
// {
4747
// text: 'Android',
4848
// icon: '/icon-Android.svg',
49-
// link: '/uikit/chatroomuikit/android/roomuikit_overview.html'
49+
// link: '/docs/uikit/chatroomuikit/android/roomuikit_overview.html'
5050
// },
5151
// {
5252
// text: 'iOS',
5353
// icon: '/icon-iOS.svg',
54-
// link: '/uikit/chatroomuikit/ios/roomuikit_overview.html'
54+
// link: '/docs/uikit/chatroomuikit/ios/roomuikit_overview.html'
5555
// },
5656
// {
5757
// text: 'Web',
5858
// icon: '/icon-web.svg',
59-
// link: '/uikit/chatroomuikit/web/roomuikit_overview.html'
59+
// link: '/docs/uikit/chatroomuikit/web/roomuikit_overview.html'
6060
// },
6161
// {
6262
// text: 'React Native',
6363
// icon: '/icon-ReactNative.svg',
64-
// link: '/uikit/chatroomuikit/react-native/roomuikit_overview.html'
64+
// link: '/docs/uikit/chatroomuikit/react-native/roomuikit_overview.html'
6565
// },
6666
// {
6767
// text: 'Flutter',
6868
// icon: '/icon-flutter.svg',
69-
// link: '/uikit/chatroomuikit/flutter/roomuikit_overview.html'
69+
// link: '/docs/uikit/chatroomuikit/flutter/roomuikit_overview.html'
7070
// }
7171
// ]
7272
// }
@@ -81,27 +81,27 @@ export const zhNavbar = navbar([
8181
{
8282
text: 'Android',
8383
icon: '/icon-Android.svg',
84-
link: '/document/android/quickstart.html'
84+
link: '/docs/sdk/android/quickstart.html'
8585
},
8686
{
8787
text: 'iOS',
8888
icon: '/icon-iOS.svg',
89-
link: '/document/ios/quickstart.html'
89+
link: '/docs/sdk/ios/quickstart.html'
9090
},
9191
{
9292
text: 'Web',
9393
icon: '/icon-web.svg',
94-
link: '/document/web/quickstart.html'
94+
link: '/docs/sdk/web/quickstart.html'
9595
},
9696
{
9797
text: 'HarmonyOS',
9898
icon: '/icon-harmonyos.svg',
99-
link: '/document/harmonyos/quickstart.html'
99+
link: '/docs/sdk/harmonyos/quickstart.html'
100100
},
101101
{
102102
text: 'Windows',
103103
icon: '/icon-windows.svg',
104-
link: '/document/windows/quickstart.html'
104+
link: '/docs/sdk/windows/quickstart.html'
105105
},
106106
]
107107
},
@@ -111,27 +111,27 @@ export const zhNavbar = navbar([
111111
{
112112
text: 'React Native',
113113
icon: '/icon-ReactNative.svg',
114-
link: '/document/react-native/quickstart.html'
114+
link: '/docs/sdk/react-native/quickstart.html'
115115
},
116116
{
117117
text: 'Flutter',
118118
icon: '/icon-flutter.svg',
119-
link: '/document/flutter/quickstart.html'
119+
link: '/docs/sdk/flutter/quickstart.html'
120120
},
121121
{
122122
text: 'Unity',
123123
icon: '/icon-unity.svg',
124-
link: '/document/unity/quickstart.html'
124+
link: '/docs/sdk/unity/quickstart.html'
125125
},
126126
{
127127
text: '小程序',
128128
icon: '/icon-mini-program.svg',
129-
link: '/document/applet/overview.html'
129+
link: '/docs/sdk/applet/overview.html'
130130
},
131131
{
132132
text: 'uni-app',
133133
icon: '/icon-uni-app.svg',
134-
link: '/document/applet/uniapp.html'
134+
link: '/docs/sdk/applet/uniapp.html'
135135
}
136136
]
137137
},
@@ -141,17 +141,17 @@ export const zhNavbar = navbar([
141141
{
142142
text: 'REST API',
143143
icon: '/icon-platform.svg',
144-
link: '/document/server-side/overview.html'
144+
link: '/docs/sdk/server-side/overview.html'
145145
},
146146
// {
147147
// text: 'Java',
148148
// icon: '/icon-platform.svg',
149-
// link: '/document/server-side/java_server_sdk_2.0.html'
149+
// link: '/docs/sdk/server-side/java_server_sdk_2.0.html'
150150
// },
151151
// {
152152
// text: 'PHP',
153153
// icon: '/icon-platform.svg',
154-
// link: '/document/server-side/php_server_sdk.html'
154+
// link: '/docs/sdk/server-side/php_server_sdk.html'
155155
// }
156156
]
157157
}

docs/.vuepress/sidebar/document.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from "node:path"
22
import fs from "node:fs"
33

44
const getSubDirectories = (dir) => fs.readdirSync(dir).filter(item => fs.statSync(path.join(dir, item)).isDirectory())
5-
const DOC_PATH = path.resolve(__dirname, '../../document')
5+
const DOC_PATH = path.resolve(__dirname, '../../docs/sdk')
66
const platformList = getSubDirectories(DOC_PATH)
77

88
const documentSidebar = [
@@ -526,7 +526,7 @@ const documentSidebar = [
526526
function buildDocSidebar() {
527527
const result = {}
528528
platformList.forEach(platform => {
529-
const key = `/document/${platform}/`
529+
const key = `/docs/sdk/${platform}/`
530530
result[key] = documentSidebar.map(sidebar => handleSidebarItem(platform, sidebar)).filter(s => s)
531531
});
532532
return result
@@ -555,7 +555,7 @@ function linkExists(platform: string, link: string): boolean {
555555
// }
556556
// }
557557
// } else if (linkExists(platform, item.link)) {
558-
// const documentLink = `/document/${platform}/${item.link.replace(/.html$/, '')}`;
558+
// const documentLink = `/docs/sdk/${platform}/${item.link.replace(/.html$/, '')}`;
559559
// newchildren.push({ ...item, link: documentLink });
560560
// }
561561
// }
@@ -593,7 +593,7 @@ function handleSidebarItem(platform, sidebar) {
593593
}
594594
} else {
595595
if (linkExists(platform, sidebar.link)) {
596-
const newLink = `/document/${platform}/${sidebar.link}`
596+
const newLink = `/docs/sdk/${platform}/${sidebar.link}`
597597
return {...sidebar, link:newLink}
598598
}
599599
}

docs/.vuepress/sidebar/uikit.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const getSubDirectories = (dir) =>
55
fs
66
.readdirSync(dir)
77
.filter((item) => fs.statSync(path.join(dir, item)).isDirectory());
8-
const CHAT_DOC_PATH = path.resolve(__dirname, "../../uikit/chatuikit");
9-
// const CHATROOM_DOC_PATH = path.resolve(__dirname, "../../uikit/chatroomuikit");
8+
const CHAT_DOC_PATH = path.resolve(__dirname, "../../docs/uikit/chatuikit");
9+
// const CHATROOM_DOC_PATH = path.resolve(__dirname, "../../docs/uikit/chatroomuikit");
1010
const chatPlatformList = getSubDirectories(CHAT_DOC_PATH);
1111
// const chatroomPlatformList = getSubDirectories(CHATROOM_DOC_PATH);
1212

@@ -298,7 +298,7 @@ const chatroomUikitSidebar = [
298298
function buildChatUikitSidebar() {
299299
const result = {};
300300
chatPlatformList.forEach((platform) => {
301-
const key = `/uikit/chatuikit/${platform}/`;
301+
const key = `/docs/uikit/chatuikit/${platform}/`;
302302
result[key] = chatUikitSidebar
303303
.map((sidebar) =>
304304
handleSidebarItem(platform, sidebar, CHAT_DOC_PATH, "chatuikit")
@@ -311,7 +311,7 @@ function buildChatUikitSidebar() {
311311
function buildChatroomUikitSidebar() {
312312
// const result = {};
313313
// chatroomPlatformList.forEach((platform) => {
314-
// const key = `/uikit/chatroomuikit/${platform}/`;
314+
// const key = `/docs/uikit/chatroomuikit/${platform}/`;
315315
// result[key] = chatroomUikitSidebar
316316
// .map((sidebar) =>
317317
// handleSidebarItem(platform, sidebar, CHATROOM_DOC_PATH, "chatroomuikit")
@@ -359,7 +359,7 @@ function handleSidebarItem(platform, sidebar, docPath, kitType) {
359359
}
360360
} else {
361361
if (linkExists(platform, sidebar.link, docPath)) {
362-
const newLink = `/uikit/${kitType}/${platform}/${sidebar.link}`;
362+
const newLink = `/docs/uikit/${kitType}/${platform}/${sidebar.link}`;
363363
return { ...sidebar, link: newLink };
364364
}
365365
}

docs/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,69 +8,69 @@ starter:
88
desc: "从下面的列表中选择合适你的 SDK 构建即时通讯应用,点击“快速开始”按钮将引导你在 30 分钟内实现即时通讯消息收发。"
99
platform:
1010
- icon: /sdk/android.svg
11-
link: /document/android/quickstart.html
11+
link: /docs/sdk/android/quickstart.html
1212
text: Android
1313
desc: "学习使用 Android SDK 构建即时通讯的 Android 应用程序。"
1414
- icon: /sdk/iOS.svg
15-
link: /document/ios/quickstart.html
15+
link: /docs/sdk/ios/quickstart.html
1616
text: iOS
1717
desc: "学习使用 iOS SDK 构建即时通讯的 iOS 应用程序。"
1818
- icon: /sdk/web.svg
19-
link: /document/web/quickstart.html
19+
link: /docs/sdk/web/quickstart.html
2020
text: Web
2121
desc: "学习使用 Web SDK 构建即时通讯的 Web 应用程序。"
2222
- icon: /sdk/applet.svg
23-
link: /document/applet/wechat.html
23+
link: /docs/sdk/applet/wechat.html
2424
text: 小程序
2525
desc: "学习使用小程序 SDK 构建即时通讯的小程序。"
2626
- icon: /sdk/harmonyos.svg
27-
link: /document/harmonyos/quickstart.html
27+
link: /docs/sdk/harmonyos/quickstart.html
2828
text: HarmonyOS
2929
desc: "学习使用 HarmonyOS SDK 构建即时通讯的 HarmonyOS 应用程序。"
3030
- icon: /sdk/flutter.svg
31-
link: /document/flutter/quickstart.html
31+
link: /docs/sdk/flutter/quickstart.html
3232
text: Flutter
3333
desc: "学习使用 Flutter SDK 构建即时通讯的 跨平台 应用程序。"
3434
- icon: /sdk/react.svg
35-
link: /document/react-native/quickstart.html
35+
link: /docs/sdk/react-native/quickstart.html
3636
text: React Native
3737
desc: "学习使用 React-Native SDK 构建即时通讯的 跨平台 应用程序。"
3838
- icon: /sdk/unity.svg
39-
link: /document/unity/quickstart.html
39+
link: /docs/sdk/unity/quickstart.html
4040
text: Unity
4141
desc: "学习使用 Unity SDK 构建即时通讯的 跨平台 应用程序。"
4242
- icon: /sdk/windows.svg
43-
link: /document/windows/quickstart.html
43+
link: /docs/sdk/windows/quickstart.html
4444
text: Windows
4545
desc: "学习使用 Windows SDK 构建即时通讯的 Windows 应用程序。"
4646
- title: "客户端 UIKit"
4747
desc: "从下面的列表中选择合适你的 UIKIT 构建即时通讯应用,点击“快速开始”按钮将引导你在 30 分钟内实现即时通讯应用。"
4848
platform:
4949
- icon: /sdk/android.svg
50-
link: /uikit/chatuikit/android/chatuikit_overview.html
50+
link: /docs/uikit/chatuikit/android/chatuikit_overview.html
5151
text: Android
5252
desc: "学习使用 Android UIKit 构建即时通讯的 Android 应用程序。"
5353
- icon: /sdk/iOS.svg
54-
link: /uikit/chatuikit/ios/chatuikit_overview.html
54+
link: /docs/uikit/chatuikit/ios/chatuikit_overview.html
5555
text: iOS
5656
desc: "学习使用 iOS UIKit 构建即时通讯的 iOS 应用程序。"
5757
- icon: /sdk/web.svg
58-
link: /uikit/chatuikit/web/chatuikit_overview.html
58+
link: /docs/uikit/chatuikit/web/chatuikit_overview.html
5959
text: Web
6060
desc: "学习使用 Web UIKit 构建即时通讯的 Web 应用程序。"
6161
- icon: /sdk/flutter.svg
62-
link: /uikit/chatuikit/flutter/chatuikit_overview.html
62+
link: /docs/uikit/chatuikit/flutter/chatuikit_overview.html
6363
text: Flutter
6464
desc: "学习使用 Flutter UIKit 构建即时通讯的 跨平台 应用程序。"
6565
- icon: /sdk/react.svg
66-
link: /uikit/chatuikit/react-native/chatuikit_overview.html
66+
link: /docs/uikit/chatuikit/react-native/chatuikit_overview.html
6767
text: React Native
6868
desc: "学习使用 React-Native UIKit 构建即时通讯的 跨平台 应用程序。"
6969
- title: "服务端 API"
7070
desc: "从下面的列表中选择合适你的 SDK 构建即时通讯应用,点击“快速开始”按钮将引导你在 30 分钟内实现即时通讯消息收发。"
7171
platform:
7272
- icon: /sdk/rest.svg
73-
link: /document/server-side/overview.html
73+
link: /docs/sdk/server-side/overview.html
7474
text: REST
7575
desc: "学习使用 Restful API 构建即时通讯的应用服务。"
7676
- icon: ""
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)