Skip to content

Commit 4814142

Browse files
committed
update docs
1 parent 5e79ab8 commit 4814142

File tree

7 files changed

+41
-17
lines changed

7 files changed

+41
-17
lines changed

docs/.vuepress/sidebar.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export const mySidebar: ThemeSidebarMulti = {
6767
collapsed: false,
6868
items: [
6969
{ text: '前言', link: 'before' },
70-
{ text: '快速开始', link: 'install' },
7170
]
7271
},
7372
{
@@ -78,6 +77,13 @@ export const mySidebar: ThemeSidebarMulti = {
7877
{ text: '插件发布', link: 'publish' },
7978
]
8079
},
80+
{
81+
text: '使用',
82+
collapsed: false,
83+
items: [
84+
{ text: '插件安装', link: 'install' }
85+
]
86+
},
8187
{
8288
text: '市场',
8389
collapsed: false,

docs/.vuepress/styles/custom.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
--vp-c-brand-3: rgba(0, 148, 133, 1);
1010

1111
/* 导航栏分组 */
12-
1312
.vp-menu-group {
1413
.title {
1514
color: rgba(60, 60, 60, 0.33);
@@ -26,7 +25,6 @@
2625
--vp-c-brand-3: rgba(0, 148, 133, 1);
2726

2827
/* 导航栏分组 */
29-
3028
.vp-menu-group {
3129
.title {
3230
color: rgba(235, 235, 235, 0.38);

docs/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,12 @@ mode="carousel"
7979
:space-between="10"
8080
:speed="5000"
8181
/>
82+
83+
<h2 align="center" style="border-top: none; margin-bottom: 24px">贡献者</h2>
84+
85+
<div align="center">
86+
<a href="https://github.com/fastapi-practices/fastapi_best_architecture/graphs/contributors">
87+
<img src="https://contrib.rocks/image?repo=fastapi-practices/fastapi_best_architecture"/>
88+
</a><br>
89+
<a href="/fastapi_best_architecture_docs/join.html" style="font-size: 13px">加入我们</a>
90+
</div>

docs/backend/reference/RBAC.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: RBAC
44

55
我们通过自定义依赖组件,实现了 RBAC 的轻松集成,它可以通过 FastAPI Depends 轻松集成
66

7-
::: warning
8-
自 fba `v1.1.2` 版本起,开始使用【角色菜单】作为默认 RBAC 鉴权,Casbin 将作为外置插件进行分发
7+
::: caution
8+
自 fba [v1.2.0](../../changelog.md) 版本起,开始将【角色菜单】作为默认 RBAC 鉴权,Casbin 作为外置插件进行分发
99
:::
1010

1111
## 角色菜单
@@ -37,8 +37,19 @@ title: RBAC
3737

3838
## Casbin
3939

40-
此方案是 Go 语言中比较流行的解决方案,它非常灵活,可以通过模型定义多种控制规则,要想实现此 RBAC
41-
鉴权,请通过 [插件市场](../../plugin/market.md) 获取
40+
此方案是 Go 语言中比较流行的解决方案,它非常灵活,可以通过模型定义多种控制规则
41+
42+
要想实现此 RBAC 鉴权,请先 [获取插件](../../plugin/market.md),然后执行以下操作
43+
44+
::: steps
45+
46+
1. 安装插件
47+
48+
2. 启用鉴权
49+
50+
修改 `backend/core/conf.py` 文件中的 `RBAC_ROLE_MENU_MODE``False`
51+
52+
:::
4253

4354
## 解耦
4455

docs/backend/reference/router.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ fba 中的路由遵循 Restful API 规范
1818
- api 接口
1919
- v1
2020
- xxx 子包
21-
- __init\_\_.py 在此文件内注册子包内 xxx.py 文件中的路由
21+
- __init__.py 在此文件内注册子包内 xxx.py 文件中的路由
2222
- xxx.py
2323
- ...
24-
- __init\_\_.py
25-
- router.py 在此文件内注册所有子包 __init\_\_.py 文件中的路由
24+
- __init__.py
25+
- router.py 在此文件内注册所有子包 __init__.py 文件中的路由
2626
- xxx 自定义应用 <Badge type="warning" text="不包含子包" />
2727
- api 接口
2828
- v1
29-
- _\_init\_\_.py 不做任何操作
29+
- __init__.py 不做任何操作
3030
- xxx.py
3131
- ...
32-
- __init\_\_.py
32+
- __init__.py
3333
- router.py 在此文件内注册所有 xxx.py 文件中的路由
34-
- __init\_\_.py
34+
- __init__.py
3535
- router.py 在此文件内注册所有 app 目录下 router.py 文件中的路由
3636

3737
:::

docs/backend/summary/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
6666
- api/ 接口
6767
- crud/ CRUD
6868
- model 模型
69-
- \_\_init\_\_.py 必须在此文件内导入所有模型类
69+
- __init__.py 必须在此文件内导入所有模型类
7070
- …
7171
- schema/ 数据传输
7272
- service/ 服务

docs/plugin/dev.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ fba 内所有官方实现都同时兼容 mysql 和 postgresql,但我们不对
9999
- xxx 插件名 <Badge type="danger" text="必须" />
100100
- api/ 接口 <Badge type="danger" text="必须" />
101101
- crud/ CRUD <Badge type="warning" text="非必须" />
102-
- model/ 模型 <Badge type="warning" text="非必须" />
103-
- \_\_init\_\_.py 在此文件内导入所有模型类 <Badge type="danger" text="必须" />
102+
- model 模型 <Badge type="warning" text="非必须" />
103+
- __init__.py 在此文件内导入所有模型类 <Badge type="danger" text="必须" />
104104
- …
105105
- schema/ 数据传输 <Badge type="warning" text="非必须" />
106106
- service/ 服务 <Badge type="warning" text="非必须" />
107107
- utils/ 工具包 <Badge type="warning" text="非必须" />
108-
- \_\_init\_\_.py 作为 python 包保留 <Badge type="danger" text="必须" />
108+
- __init__.py 作为 python 包保留 <Badge type="danger" text="必须" />
109109
- conf.py 插件独立配置 <Badge type="warning" text="非必须" />
110110
- … 更多其他配置,例如 enums.py... <Badge type="warning" text="非必须" />
111111
- plugin.toml 插件配置文件 <Badge type="danger" text="必须" />

0 commit comments

Comments
 (0)