Skip to content

Commit 129580b

Browse files
committed
update docs
1 parent d84bfd7 commit 129580b

6 files changed

Lines changed: 80 additions & 32 deletions

File tree

docs/.vuepress/layouts/Layout.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup>
22
import BannerTop from "../components/BannerTop.vue";
33
import Footer from "../components/Footer.vue";
4-
import PageContextMenu from 'vuepress-theme-plume/features/PageContextMenu.vue'
54
import SponsorPanel from "../components/SponsorPanel.vue";
65
import SponsorSidebar from "../components/SponsorSidebar.vue";
76
@@ -43,9 +42,6 @@ const showSidebarSponsorOnAsideTop = computed(() => frontmatter.value.sponsor_si
4342
<SponsorSidebar />
4443
</div>
4544
</template>
46-
<template #doc-title-after>
47-
<PageContextMenu />
48-
</template>
4945
<template #aside-outline-after>
5046
<div class="custom-content">
5147
<SponsorPanel />

docs/.vuepress/sidebar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ export const mySidebar: ThemeSidebarMulti = {
6969
collapsed: false,
7070
items: [
7171
{ text: '前言', link: 'before' },
72-
{ text: '视频讲解', link: 'video' },
7372
]
7473
},
7574
{
7675
text: '参考',
7776
collapsed: false,
7877
items: [
78+
{ text: '视频讲解', link: 'video' },
7979
{ text: '插件开发', link: 'dev' },
8080
{ text: '插件分享', link: 'share' },
8181
{ text: '插件安装', link: 'install' },

docs/.vuepress/styles/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@
9292
border-radius: 10px !important;
9393
}
9494

95+
/* 首页全屏时向下的箭头 */
96+
.vp-sign-down {
97+
color: var(--vp-c-brand-1) !important;
98+
}
99+
95100
/* 公告板 */
96101
.vp-bulletin {
97102
width: 380px !important;

docs/plugin/dev.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ fba 内所有官方实现都同时兼容 mysql 和 postgresql,但我们不对
115115

116116
插件统一放置在 `backend/plugin` 目录下,以下是插件的目录结构
117117

118-
::: warning
119-
请严格按照此结构进行插件开发,否则插件将无法完美适配 fba 内置功能
120-
:::
121-
122118
::: file-tree
123119

124120
- xxx 插件名 <Badge type="danger" text="必须" />

docs/plugin/share.md

Lines changed: 70 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,110 @@
22
title: 插件分享
33
---
44

5-
## 后端
5+
想要将插件与他人分享,您必须为此创建一个公开的 Github 仓库
66

7-
:::: steps
7+
## 后端
88

9-
1. 创建个人插件仓库
9+
::: warning 插件仓库命名规则
10+
`插件仓库名 == 插件名`
1011

11-
推荐使用插件模板仓库 [fba_plugin_template](https://github.com/fastapi-practices/fba_plugin_template) 创建个人插件仓库
12+
假如你的插件仓库命名为 `sms`,安装此插件后,`backend/plugin` 目录下就会新增一个 `sms` 文件夹
1213

13-
::: warning 插件仓库命名规则
14-
`个人插件仓库名 == 插件名`
14+
插件总是独一无二的,不允许安装同名插件,所以在对插件进行命名时,应尽量保持其独特性,否则将导致插件冲突
15+
:::
1516

16-
假如你的个人插件仓库命名为 `sms`,安装此插件后,`backend/plugin` 目录下就会新增一个 `sms` 文件夹
17+
:::: steps
1718

18-
插件总是独一无二的,不允许安装同名插件,所以我们在对插件进行命名时,应尽量保持其独特性
19-
:::
19+
1. 创建个人插件仓库
2020

21+
::: details 使用 [fba_plugin_template](https://github.com/fastapi-practices/fba_plugin_template) 创建个人插件仓库
2122
![repo](/images/plugin_template.png)
23+
:::
2224

2325
2. 上传代码
2426

2527
将在 fba 中开发好的所有插件代码拷贝到个人插件仓库中
2628

2729
::: caution
28-
应拷贝插件目录中的所有文件,而不是直接拷贝插件目录
30+
应拷贝插件目录中的所有文件,而不是拷贝插件目录
2931
:::
3032

3133
::::
3234

3335
## 前端
3436

35-
:::: steps
37+
::: warning 插件仓库命名规则
38+
`插件仓库名 == 插件名`
3639

37-
1. 创建个人插件仓库
40+
假如你的个人插件仓库命名为 `sms`,安装此插件后,`apps/web-antd/src/plugins` 目录下就会新增一个 `sms` 文件夹
3841

39-
使用插件模板仓库 [fba_ui_plugin_template](https://github.com/fastapi-practices/fba_ui_plugin_template) 创建个人插件仓库
42+
插件总是独一无二的,不允许安装同名插件,所以在对插件进行命名时,应尽量保持其独特性,否则将导致插件冲突
43+
:::
4044

41-
::: warning 插件仓库命名规则
42-
`个人插件仓库名 == 插件名_ui`
45+
:::: steps
4346

44-
假如你的个人插件仓库命名为 `sms_ui`,安装此插件后,`apps/web-antd/src/plugins` 目录下就会新增一个 `sms` 文件夹
47+
1. 创建个人插件仓库
4548

46-
插件总是独一无二的,不允许安装同名插件,所以我们在对插件进行命名时,应尽量保持其独特性
47-
:::
49+
使用 [fba_ui_plugin_template](https://github.com/fastapi-practices/fba_ui_plugin_template) 创建个人插件仓库
4850

4951
2. 上传代码
5052

51-
将在 fba_ui 中开发好的所有插件代码拷贝到个人插件仓库中,==仅限 Vben Admin Antd 工程=={.warning}
53+
将在 fba_ui 中开发好的所有插件代码拷贝到个人插件仓库中,仅限 [Vben Admin Antd](../frontend/summary/intro.md) 工程
5254

5355
::: caution
54-
应拷贝插件目录中的所有文件,而不是直接拷贝插件目录
56+
应拷贝插件目录中的所有文件,而不是拷贝插件目录
5557
:::
5658

5759
::::
5860

5961
## 发布
6062

61-
我们创建了一个简易的 [插件市场](../market.md),用于插件展示和导航
63+
:::: steps
64+
65+
1. Fork 仓库
66+
67+
[进入 fba 插件 github 仓库](https://github.com/fastapi-practices/plugins),将仓库 fork 到个人账户
6268

63-
如果您开发的插件与 fba 兼容,欢迎在 Discord
64-
社区的 [插件系统](https://discord.com/channels/1185035164577972344/1349951379560599572) 频道与我们分享
69+
2. 克隆仓库
70+
71+
```shell
72+
# 将地址替换为上面 fork 的仓库地址
73+
git clone https://github.com/your-username/plugins.git
74+
```
75+
76+
3. 创建分支
77+
78+
```shell
79+
# 注意替换 add-your-plugin
80+
git checkout -b add-your-plugin
81+
```
82+
83+
4. 扩展子模块
84+
85+
```shell
86+
# 注意替换 your-username、your-plugin-name
87+
git submodule add https://github.com/your-username/your-plugin-name.git plugins/your-plugin-name
88+
git add plugins/your-plugin-name
89+
```
90+
91+
::: warning
92+
所有扩展子模块必须使用 HTTPS URL,而不是 SSH URL(git@github.com
93+
:::
94+
95+
5. 提交和推送
96+
97+
```shell
98+
# 注意替换 your-plugin-name
99+
git commit -m "Add your-plugin-name plugin"
100+
git push
101+
```
102+
103+
6. PR
104+
105+
通过 GitHub 创建 PR
106+
107+
7. 合并
108+
109+
fba 团队将尽快完成检查,一旦您的 PR 合并,插件将被发布到 [插件市场](../market.md)
110+
111+
::::

docs/plugin/video.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ title: 视频讲解
44

55
我们将通过此视频分别介绍 [插件开发](./dev.md)[插件分享](./share.md)[插件安装](install.md)
66

7+
::: warning
8+
此视频已过时,需等待重新录制
9+
:::
10+
711
@[bilibili](BV1qaoLYxEXi)

0 commit comments

Comments
 (0)