From d2411f5b63a58b3e7b6592c4727c66ae80695bd0 Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 7 Oct 2022 12:11:21 +0800 Subject: [PATCH] feat: update docs --- .umirc.ts | 16 +++-- docs/menus.ts | 58 ++++++++++++------ docs/zh-CN/index.md | 1 + .../community}/contributing.md | 0 docs/zh-CN/welcome/community/faq.md | 1 + .../community}/thanks.md | 0 .../community}/translations.md | 2 +- .../getting-started/deployment.md | 0 .../installation/create-nocobase-app.md | 0 .../installation/docker-compose.md | 0 .../getting-started/installation/git-clone.md | 0 .../getting-started/installation/index.md | 0 .../getting-started/upgrading.md | 0 .../{ => welcome}/introduction/features.md | 0 .../features/2.collection-block.png | Bin .../introduction/features/2.user-root.gif | Bin .../zh-CN/{ => welcome}/introduction/index.md | 2 +- .../introduction}/learning-guide.md | 22 +++++-- .../{ => welcome}/introduction/quickstart.md | 0 .../quickstart/1.action-block.gif | Bin .../introduction/quickstart/1.action.gif | Bin .../quickstart/1.auto.relation.jpg | Bin .../introduction/quickstart/1.block.gif | Bin .../introduction/quickstart/1.collections.jpg | Bin .../introduction/quickstart/1.customers.gif | Bin .../quickstart/1.customers.gif.gif | Bin .../introduction/quickstart/1.editor.gif | Bin .../introduction/quickstart/1.fields.jpg | Bin .../introduction/quickstart/1.finished.gif | Bin .../introduction/quickstart/1.menu.gif | Bin .../introduction/quickstart/1.relation.jpg | Bin .../introduction/quickstart/2.field.gif | Bin .../introduction/quickstart/2.field.gif.gif | Bin .../{ => welcome}/introduction/roadmap.md | 0 docs/zh-CN/{ => welcome}/introduction/when.md | 0 .../src/builtins/Redirect.tsx | 4 ++ 36 files changed, 73 insertions(+), 33 deletions(-) create mode 100644 docs/zh-CN/index.md rename docs/zh-CN/{development => welcome/community}/contributing.md (100%) create mode 100644 docs/zh-CN/welcome/community/faq.md rename docs/zh-CN/{introduction => welcome/community}/thanks.md (100%) rename docs/zh-CN/{development => welcome/community}/translations.md (99%) rename docs/zh-CN/{ => welcome}/getting-started/deployment.md (100%) rename docs/zh-CN/{ => welcome}/getting-started/installation/create-nocobase-app.md (100%) rename docs/zh-CN/{ => welcome}/getting-started/installation/docker-compose.md (100%) rename docs/zh-CN/{ => welcome}/getting-started/installation/git-clone.md (100%) rename docs/zh-CN/{ => welcome}/getting-started/installation/index.md (100%) rename docs/zh-CN/{ => welcome}/getting-started/upgrading.md (100%) rename docs/zh-CN/{ => welcome}/introduction/features.md (100%) rename docs/zh-CN/{ => welcome}/introduction/features/2.collection-block.png (100%) rename docs/zh-CN/{ => welcome}/introduction/features/2.user-root.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/index.md (99%) rename docs/zh-CN/{development => welcome/introduction}/learning-guide.md (79%) rename docs/zh-CN/{ => welcome}/introduction/quickstart.md (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.action-block.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.action.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.auto.relation.jpg (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.block.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.collections.jpg (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.customers.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.customers.gif.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.editor.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.fields.jpg (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.finished.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.menu.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/1.relation.jpg (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/2.field.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/quickstart/2.field.gif.gif (100%) rename docs/zh-CN/{ => welcome}/introduction/roadmap.md (100%) rename docs/zh-CN/{ => welcome}/introduction/when.md (100%) create mode 100644 packages/core/dumi-theme-nocobase/src/builtins/Redirect.tsx diff --git a/.umirc.ts b/.umirc.ts index 9952be5a3..cc0e60601 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -115,13 +115,13 @@ export default defineConfig({ ], 'zh-CN': [ { - title: '介绍', - path: '/introduction' - }, - { - title: '快速开始', - path: '/getting-started' + title: '欢迎', + path: '/welcome' }, + // { + // title: '快速开始', + // path: '/getting-started' + // }, { title: '使用手册', path: '/manual' @@ -134,6 +134,10 @@ export default defineConfig({ title: 'API 参考', path: '/api' }, + // { + // title: '社区', + // path: '/community' + // }, { title: 'GitHub', path: 'https://github.com/nocobase/nocobase', diff --git a/docs/menus.ts b/docs/menus.ts index 719eb8f74..a4576fe7c 100644 --- a/docs/menus.ts +++ b/docs/menus.ts @@ -1,26 +1,47 @@ export default { - '/introduction': [ - '/introduction/index', - '/introduction/features', - '/introduction/when', - '/introduction/quickstart', - '/introduction/roadmap', - '/introduction/thanks', - ], - '/getting-started': [ + '/welcome': [ { - title: 'Installation', - 'title.zh-CN': '安装', - type: 'subMenu', + title: 'Welcome', + 'title.zh-CN': '欢迎', + type: 'group', children: [ - '/getting-started/installation/index', - '/getting-started/installation/docker-compose', - '/getting-started/installation/create-nocobase-app', - '/getting-started/installation/git-clone', + '/welcome/introduction/index', + '/welcome/introduction/features', + '/welcome/introduction/when', + '/welcome/introduction/learning-guide', + ], + }, + { + title: 'Getting started', + 'title.zh-CN': '快速开始', + type: 'group', + children: [ + { + title: 'Installation', + 'title.zh-CN': '安装', + type: 'subMenu', + children: [ + '/welcome/getting-started/installation/index', + '/welcome/getting-started/installation/docker-compose', + '/welcome/getting-started/installation/create-nocobase-app', + '/welcome/getting-started/installation/git-clone', + ], + }, + '/welcome/getting-started/upgrading', + '/welcome/getting-started/deployment', + ], + }, + { + title: 'Community', + 'title.zh-CN': '社区', + type: 'group', + children: [ + '/welcome/community/contributing', + '/welcome/community/faq', + '/welcome/community/translations', + '/welcome/community/thanks', ], }, - '/getting-started/upgrading', - // '/getting-started/deployment', ], '/manual': [ '/manual/functional-zoning', @@ -42,7 +63,6 @@ export default { children: [ '/development/index', '/development/your-fisrt-plugin', - '/development/learning-guide', ], }, { diff --git a/docs/zh-CN/index.md b/docs/zh-CN/index.md new file mode 100644 index 000000000..ab11f4321 --- /dev/null +++ b/docs/zh-CN/index.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/zh-CN/development/contributing.md b/docs/zh-CN/welcome/community/contributing.md similarity index 100% rename from docs/zh-CN/development/contributing.md rename to docs/zh-CN/welcome/community/contributing.md diff --git a/docs/zh-CN/welcome/community/faq.md b/docs/zh-CN/welcome/community/faq.md new file mode 100644 index 000000000..b43101d19 --- /dev/null +++ b/docs/zh-CN/welcome/community/faq.md @@ -0,0 +1 @@ +# 常见问题 diff --git a/docs/zh-CN/introduction/thanks.md b/docs/zh-CN/welcome/community/thanks.md similarity index 100% rename from docs/zh-CN/introduction/thanks.md rename to docs/zh-CN/welcome/community/thanks.md diff --git a/docs/zh-CN/development/translations.md b/docs/zh-CN/welcome/community/translations.md similarity index 99% rename from docs/zh-CN/development/translations.md rename to docs/zh-CN/welcome/community/translations.md index bfed7c89d..93e4508a8 100644 --- a/docs/zh-CN/development/translations.md +++ b/docs/zh-CN/welcome/community/translations.md @@ -15,7 +15,7 @@ https://github.com/nocobase/nocobase/tree/main/packages/core/client/src/locale 请复制 en_US.ts,命名为想要新增的语言的名字,然后对其中的字符串进行翻译。翻译完成之后,请通过 pull request 提交给 NocoBase,我们将会把它加入语言列表。之后你将在系统配置中看到新增的语言,在这里你可以配置需要显示哪些语言供用户选择。 - + 下面的表格中列出了 Language Culture Name, Locale File Name, Display Name. diff --git a/docs/zh-CN/getting-started/deployment.md b/docs/zh-CN/welcome/getting-started/deployment.md similarity index 100% rename from docs/zh-CN/getting-started/deployment.md rename to docs/zh-CN/welcome/getting-started/deployment.md diff --git a/docs/zh-CN/getting-started/installation/create-nocobase-app.md b/docs/zh-CN/welcome/getting-started/installation/create-nocobase-app.md similarity index 100% rename from docs/zh-CN/getting-started/installation/create-nocobase-app.md rename to docs/zh-CN/welcome/getting-started/installation/create-nocobase-app.md diff --git a/docs/zh-CN/getting-started/installation/docker-compose.md b/docs/zh-CN/welcome/getting-started/installation/docker-compose.md similarity index 100% rename from docs/zh-CN/getting-started/installation/docker-compose.md rename to docs/zh-CN/welcome/getting-started/installation/docker-compose.md diff --git a/docs/zh-CN/getting-started/installation/git-clone.md b/docs/zh-CN/welcome/getting-started/installation/git-clone.md similarity index 100% rename from docs/zh-CN/getting-started/installation/git-clone.md rename to docs/zh-CN/welcome/getting-started/installation/git-clone.md diff --git a/docs/zh-CN/getting-started/installation/index.md b/docs/zh-CN/welcome/getting-started/installation/index.md similarity index 100% rename from docs/zh-CN/getting-started/installation/index.md rename to docs/zh-CN/welcome/getting-started/installation/index.md diff --git a/docs/zh-CN/getting-started/upgrading.md b/docs/zh-CN/welcome/getting-started/upgrading.md similarity index 100% rename from docs/zh-CN/getting-started/upgrading.md rename to docs/zh-CN/welcome/getting-started/upgrading.md diff --git a/docs/zh-CN/introduction/features.md b/docs/zh-CN/welcome/introduction/features.md similarity index 100% rename from docs/zh-CN/introduction/features.md rename to docs/zh-CN/welcome/introduction/features.md diff --git a/docs/zh-CN/introduction/features/2.collection-block.png b/docs/zh-CN/welcome/introduction/features/2.collection-block.png similarity index 100% rename from docs/zh-CN/introduction/features/2.collection-block.png rename to docs/zh-CN/welcome/introduction/features/2.collection-block.png diff --git a/docs/zh-CN/introduction/features/2.user-root.gif b/docs/zh-CN/welcome/introduction/features/2.user-root.gif similarity index 100% rename from docs/zh-CN/introduction/features/2.user-root.gif rename to docs/zh-CN/welcome/introduction/features/2.user-root.gif diff --git a/docs/zh-CN/introduction/index.md b/docs/zh-CN/welcome/introduction/index.md similarity index 99% rename from docs/zh-CN/introduction/index.md rename to docs/zh-CN/welcome/introduction/index.md index 73a017609..1bcd92e73 100644 --- a/docs/zh-CN/introduction/index.md +++ b/docs/zh-CN/welcome/introduction/index.md @@ -1,4 +1,4 @@ -# 概述 +# 介绍 ![](https://www.nocobase.com/images/demo/11.png) diff --git a/docs/zh-CN/development/learning-guide.md b/docs/zh-CN/welcome/introduction/learning-guide.md similarity index 79% rename from docs/zh-CN/development/learning-guide.md rename to docs/zh-CN/welcome/introduction/learning-guide.md index 10b5d899f..cc5744757 100644 --- a/docs/zh-CN/development/learning-guide.md +++ b/docs/zh-CN/welcome/introduction/learning-guide.md @@ -1,8 +1,10 @@ # 学习路线指南 -## 第一步:从安装运行 NocoBase 开始 +## 1. 从安装运行 NocoBase 开始 -主要的命令包括: +**相关文档:快速开始** + +主要命令包括: 下载 @@ -28,7 +30,9 @@ yarn build yarn start ``` -## 第二步:了解 NocoBase 平台提供的核心功能 +## 2. 了解 NocoBase 平台提供的核心功能 + +**相关文档:使用手册** 主要的三部分包括: @@ -36,7 +40,9 @@ yarn start - 插件管理器:功能需求扩展 - 配置中心:已激活插件提供的配置功能 -## 第三步:进一步了解插件管理器的使用 +## 3. 进一步了解插件管理器的使用 + +**相关文档:插件开发** NocoBase 提供了简易的插件管理器界面,但是在界面上只能处理本地插件的 enable、disable 和 remove,完整的操作需要通过 CLI @@ -55,7 +61,9 @@ yarn pm remove hello 更多插件示例,查看 packages/samples,通过 samples 插件能够了解插件的基本用法,就可以进一步开发插件了。 -## 第四步:开发新插件,了解模块分布 +## 4. 开发新插件,了解模块分布 + +**相关文档:扩展指南** [编写第一个插件](/development/your-fisrt-plugin) 章节,虽然简单的讲述了插件的主要开发流程,但是为了更快速的介入插件细节,你可能需要进一步了解 NocoBase 框架的模块分布: @@ -74,7 +82,9 @@ yarn pm remove hello - Commands:自定义命令行 - Migrations:迁移脚本 -## 第五步:查阅各模块主要 API +## 5. 查阅各模块主要 API + +**相关文档:API 参考** 查看各模块的 packages/samples,进一步了解模块主要 API 的用法 diff --git a/docs/zh-CN/introduction/quickstart.md b/docs/zh-CN/welcome/introduction/quickstart.md similarity index 100% rename from docs/zh-CN/introduction/quickstart.md rename to docs/zh-CN/welcome/introduction/quickstart.md diff --git a/docs/zh-CN/introduction/quickstart/1.action-block.gif b/docs/zh-CN/welcome/introduction/quickstart/1.action-block.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.action-block.gif rename to docs/zh-CN/welcome/introduction/quickstart/1.action-block.gif diff --git a/docs/zh-CN/introduction/quickstart/1.action.gif b/docs/zh-CN/welcome/introduction/quickstart/1.action.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.action.gif rename to docs/zh-CN/welcome/introduction/quickstart/1.action.gif diff --git a/docs/zh-CN/introduction/quickstart/1.auto.relation.jpg b/docs/zh-CN/welcome/introduction/quickstart/1.auto.relation.jpg similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.auto.relation.jpg rename to docs/zh-CN/welcome/introduction/quickstart/1.auto.relation.jpg diff --git a/docs/zh-CN/introduction/quickstart/1.block.gif b/docs/zh-CN/welcome/introduction/quickstart/1.block.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.block.gif rename to docs/zh-CN/welcome/introduction/quickstart/1.block.gif diff --git a/docs/zh-CN/introduction/quickstart/1.collections.jpg b/docs/zh-CN/welcome/introduction/quickstart/1.collections.jpg similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.collections.jpg rename to docs/zh-CN/welcome/introduction/quickstart/1.collections.jpg diff --git a/docs/zh-CN/introduction/quickstart/1.customers.gif b/docs/zh-CN/welcome/introduction/quickstart/1.customers.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.customers.gif rename to docs/zh-CN/welcome/introduction/quickstart/1.customers.gif diff --git a/docs/zh-CN/introduction/quickstart/1.customers.gif.gif b/docs/zh-CN/welcome/introduction/quickstart/1.customers.gif.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.customers.gif.gif rename to docs/zh-CN/welcome/introduction/quickstart/1.customers.gif.gif diff --git a/docs/zh-CN/introduction/quickstart/1.editor.gif b/docs/zh-CN/welcome/introduction/quickstart/1.editor.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.editor.gif rename to docs/zh-CN/welcome/introduction/quickstart/1.editor.gif diff --git a/docs/zh-CN/introduction/quickstart/1.fields.jpg b/docs/zh-CN/welcome/introduction/quickstart/1.fields.jpg similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.fields.jpg rename to docs/zh-CN/welcome/introduction/quickstart/1.fields.jpg diff --git a/docs/zh-CN/introduction/quickstart/1.finished.gif b/docs/zh-CN/welcome/introduction/quickstart/1.finished.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.finished.gif rename to docs/zh-CN/welcome/introduction/quickstart/1.finished.gif diff --git a/docs/zh-CN/introduction/quickstart/1.menu.gif b/docs/zh-CN/welcome/introduction/quickstart/1.menu.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.menu.gif rename to docs/zh-CN/welcome/introduction/quickstart/1.menu.gif diff --git a/docs/zh-CN/introduction/quickstart/1.relation.jpg b/docs/zh-CN/welcome/introduction/quickstart/1.relation.jpg similarity index 100% rename from docs/zh-CN/introduction/quickstart/1.relation.jpg rename to docs/zh-CN/welcome/introduction/quickstart/1.relation.jpg diff --git a/docs/zh-CN/introduction/quickstart/2.field.gif b/docs/zh-CN/welcome/introduction/quickstart/2.field.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/2.field.gif rename to docs/zh-CN/welcome/introduction/quickstart/2.field.gif diff --git a/docs/zh-CN/introduction/quickstart/2.field.gif.gif b/docs/zh-CN/welcome/introduction/quickstart/2.field.gif.gif similarity index 100% rename from docs/zh-CN/introduction/quickstart/2.field.gif.gif rename to docs/zh-CN/welcome/introduction/quickstart/2.field.gif.gif diff --git a/docs/zh-CN/introduction/roadmap.md b/docs/zh-CN/welcome/introduction/roadmap.md similarity index 100% rename from docs/zh-CN/introduction/roadmap.md rename to docs/zh-CN/welcome/introduction/roadmap.md diff --git a/docs/zh-CN/introduction/when.md b/docs/zh-CN/welcome/introduction/when.md similarity index 100% rename from docs/zh-CN/introduction/when.md rename to docs/zh-CN/welcome/introduction/when.md diff --git a/packages/core/dumi-theme-nocobase/src/builtins/Redirect.tsx b/packages/core/dumi-theme-nocobase/src/builtins/Redirect.tsx new file mode 100644 index 000000000..88d2c1560 --- /dev/null +++ b/packages/core/dumi-theme-nocobase/src/builtins/Redirect.tsx @@ -0,0 +1,4 @@ +import { Redirect } from 'dumi'; +import React from 'react'; + +export default (props) => ;