From 0a8c7e9293f588b459a6d845c56a413c5cebd4a5 Mon Sep 17 00:00:00 2001 From: IanXu Date: Wed, 19 Jun 2024 18:54:16 +0800 Subject: [PATCH] update doc structure --- docs/.vitepress/config.mts | 23 +++++++++++++------ docs/index.md | 10 ++++---- docs/sway-applications/index.md | 3 ++- .../{ => get-start}/getting-started.md | 6 ++--- docs/typescript-sdk/{ => get-start}/index.md | 2 +- docs/typescript-sdk/guide/provider/index.md | 4 ++-- .../guide/provider/querying-the-chain.md | 4 ++-- 7 files changed, 31 insertions(+), 21 deletions(-) rename docs/typescript-sdk/{ => get-start}/getting-started.md (95%) rename docs/typescript-sdk/{ => get-start}/index.md (98%) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index ebd615c..f39bb8b 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -43,7 +43,7 @@ export default defineConfig({ { text: '1. 简介', collapsed: false, - link: '/swaybook/introduction/index', + link: '/swaybook/introduction/', items: [ { text: '1.1 入门指南', link: '/swaybook/introduction/getting_started' }, { text: '1.2 Fuel 工具链', link: '/swaybook/introduction/fuel_toolchain' }, @@ -228,8 +228,19 @@ export default defineConfig({ ], '/typescript-sdk': [ { - text: '入门指南', - link: '/typescript-sdk/getting-started.md', + text: 'Geting Started', + link: '/typescript-sdk/get-start', + collapsed: true, + items: [ + { + text: '概述', + link: '/typescript-sdk/get-start/', + }, + { + text: '入门指南', + link: '/typescript-sdk/get-start/getting-started', + }, + ] }, { text: '创建一个 Fuel dApp', @@ -711,8 +722,8 @@ export default defineConfig({ "/sway-applications" : [ { text: '构建市场dApp', - link: '/sway-applications/market/index', - collapsed: true, + link: '/sway-applications/market/', + collapsed: false, items: [ { text: '基础条件', link: '/sway-applications/market/prerequisites' }, { text: '项目导入', link: '/sway-applications/market/imports' }, @@ -723,8 +734,6 @@ export default defineConfig({ { text: '合约检查站', link: '/sway-applications/market/checkpoint' }, { text: '合约测试', link: '/sway-applications/market/test' }, { text: '构建前端', link: '/sway-applications/market/typescript_frontend' }, - - ] }, ] diff --git a/docs/index.md b/docs/index.md index a8b7e5b..ebc9107 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,16 +9,16 @@ hero: actions: - theme: brand text: SwayBook 中文教程 - link: /swaybook/introduction/index + link: /swaybook/introduction - theme: alt text: TypeScript SDK 中文教程 - link: /typescript-sdk/index + link: /typescript-sdk/get-start - theme: alt text: Sway Example 中文教程 - link: /sway-example/index + link: /sway-example/ - theme: alt - text: Sway applications 中文教程 - link: /sway-applications/market/index + text: Sway 实战案例 + link: /sway-applications/ features: - icon: 🎉 diff --git a/docs/sway-applications/index.md b/docs/sway-applications/index.md index 8276110..6fe2646 100644 --- a/docs/sway-applications/index.md +++ b/docs/sway-applications/index.md @@ -1 +1,2 @@ -这是sway应用示例的首页。 \ No newline at end of file +基于 Sway 构建的各类 Dapp 的实战案例。 +欢迎各位开发者贡献你的案例/教程 🎉,在我们的 Github 提交 PR 即可。 diff --git a/docs/typescript-sdk/getting-started.md b/docs/typescript-sdk/get-start/getting-started.md similarity index 95% rename from docs/typescript-sdk/getting-started.md rename to docs/typescript-sdk/get-start/getting-started.md index 6a3d122..d5fbd80 100644 --- a/docs/typescript-sdk/getting-started.md +++ b/docs/typescript-sdk/get-start/getting-started.md @@ -1,5 +1,5 @@ @@ -144,8 +144,8 @@ export default App; 首先,您需要在您的机器上运行一个本地节点。我们推荐以下方法之一: -- [测试工具](./guide/testing/index.md#wallet-test-utilities) 可以帮助您以编程方式启动一个短暂的节点。 -- 直接运行 [fuel-core](https://docs.fuel.network/guides/running-a-node/running-a-local-node/),或通过 CLI [fuels](./guide/fuels-cli/commands.md#fuels-core)。 +- [测试工具](../guide/testing/index.md#wallet-test-utilities) 可以帮助您以编程方式启动一个短暂的节点。 +- 直接运行 [fuel-core](https://docs.fuel.network/guides/running-a-node/running-a-local-node/),或通过 CLI [fuels](../guide/fuels-cli/commands.md#fuels-core)。 在以下示例中,我们创建了一个提供程序以连接到本地节点并签署消息。 diff --git a/docs/typescript-sdk/index.md b/docs/typescript-sdk/get-start/index.md similarity index 98% rename from docs/typescript-sdk/index.md rename to docs/typescript-sdk/get-start/index.md index 600b91e..e7bdcb9 100644 --- a/docs/typescript-sdk/index.md +++ b/docs/typescript-sdk/get-start/index.md @@ -1,5 +1,5 @@