Skip to content

Commit 02f7ee2

Browse files
committed
update docs
1 parent f1515e4 commit 02f7ee2

19 files changed

+1130
-2051
lines changed

docs/.vuepress/bulletin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ export const myBulletin: BulletinOptions = {
55
lifetime: 'session',
66
contentType: 'markdown',
77
title: 'FasAPI 最佳架构',
8-
content: '欢迎大家闲聊,分享,提供建议,高频艾特,你们的活跃度是我更新的动力 🌹',
8+
content: '欢迎大家加入 Discord 社区闲聊,分享,提供建议,高频艾特,你们的活跃度是我更新的动力 🌹',
99
}

docs/.vuepress/config.ts

+30-32
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ export default defineUserConfig({
2929
],
3030
theme: plumeTheme({
3131
hostname: 'https://fastapi-practices.github.io/fastapi_best_architecture_docs/',
32+
logo: 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png',
33+
docsRepo: 'https://github.com/fastapi-practices/fastapi_best_architecture_docs',
34+
docsBranch: 'master',
35+
docsDir: 'docs',
3236
blog: false,
3337
notes: false,
38+
bulletin: myBulletin,
39+
sidebar: mySidebar,
40+
sidebarScrollbar: false,
41+
navbar: myNavbar,
3442
autoFrontmatter: {
3543
title: true,
3644
permalink: false,
3745
createTime: false,
3846
},
39-
bulletin: myBulletin,
40-
sidebar: mySidebar,
41-
sidebarScrollbar: false,
42-
navbar: myNavbar,
43-
logo: 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png',
44-
docsRepo: 'https://github.com/fastapi-practices/fastapi_best_architecture_docs',
45-
docsBranch: 'master',
46-
docsDir: 'docs',
4747
social: [
4848
{icon: 'github', link: 'https://github.com/fastapi-practices/fastapi_best_architecture'},
4949
{
@@ -56,8 +56,7 @@ export default defineUserConfig({
5656
{icon: 'discord', link: 'https://discord.com/invite/yNN3wTbVAC'}
5757
],
5858
navbarSocialInclude: ['github', 'gitee', 'discord'],
59-
editLinkText: '在 GitHub 上编辑此页面',
60-
lastUpdated: false,
59+
editLinkText: '编辑此页面',
6160
contributors: false,
6261
copyright: {
6362
license: {
@@ -68,28 +67,27 @@ export default defineUserConfig({
6867
footer: {
6968
copyright: 'Copyright © 2024-present FastAPI Practices'
7069
},
71-
plugins: {
72-
shiki: {
73-
languages: ['shell', 'yaml', 'py']
74-
},
75-
// watermark: true,
76-
markdownPower: {
77-
abbr: true,
78-
annotation: true,
79-
icons: true,
80-
},
81-
markdownEnhance: {
82-
mermaid: true,
83-
},
84-
comment: {
85-
provider: 'Giscus',
86-
comment: true,
87-
repo: 'fastapi-practices/fastapi_best_architecture_docs',
88-
repoId: 'R_kgDOMv5sMQ',
89-
category: 'Comment',
90-
categoryId: 'DIC_kwDOMv5sMc4CmLp9',
91-
lazyLoading: true,
92-
},
70+
// watermark: false,
71+
markdown: {
72+
alert: true,
73+
abbr: true,
74+
annotation: true,
75+
mermaid: true,
76+
},
77+
codeHighlighter: {
78+
themes: {
79+
dark: 'one-dark-pro',
80+
light: 'one-light'
81+
}
82+
},
83+
comment: {
84+
provider: 'Giscus',
85+
comment: true,
86+
repo: 'fastapi-practices/fastapi_best_architecture_docs',
87+
repoId: 'R_kgDOMv5sMQ',
88+
category: 'Comment',
89+
categoryId: 'DIC_kwDOMv5sMc4CmLp9',
90+
lazyLoading: true,
9391
},
9492
}),
9593
bundler: viteBundler(),

docs/.vuepress/navbar.ts

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ export const myNavbar = defineNavbarConfig([
3333
{
3434
text: 'v1.0.3',
3535
items: [
36+
{
37+
text: '常见问题',
38+
icon: 'healthicons:question',
39+
link: '/questions.md'
40+
},
3641
{
3742
text: '技术支持',
3843
icon: 'fluent-emoji-high-contrast:unicorn',
21 KB
Loading

docs/guide/deploy/Docker.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
title: Docker 部署
33
---
44

5-
::: warning
6-
默认端口冲突:8000、3306、6379、5672、5432
7-
8-
如果 docker 容器启动时端口被占用,会导致启动失败,建议在启动前检查本地端口占用情况
9-
:::
10-
115
::: info
126
一个还不错的教程网站:[Docker - 从入门到实践](https://yeasy.gitbook.io/docker_practice)
137
:::
@@ -85,7 +79,7 @@ title: Docker 部署
8579

8680
::: warning
8781
如果你需要使用 PostgreSQL 数据库,执行命令前,需修改 `.env.server` 部分配置如下:
88-
```env:no-line-numbers
82+
```text:no-line-numbers
8983
# Database
9084
DATABASE_TYPE='postgresql'
9185
DATABASE_HOST='fba_postgres'

docs/guide/reference/RBAC.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fba 中默认使用此鉴权方式
7777

7878
内置模型 `backend/plugin/casbin/utils/rbac.py`
7979

80-
```model
80+
```text:no-line-numbers
8181
[request_definition]
8282
r = sub, obj, act
8383

docs/guide/reference/db.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ docker run -d --name fba_postgres --restart always -e POSTGRES_DB='fba' -e POSTG
1919
PostgreSQL 与 MySQL 在用户名、端口号等方面有所不同,如果你使用上面的命令创建了 Docker 镜像,需修改 `.env` 部分配置如下,否则,请根据
2020
PostgreSQL 配置进行修改
2121

22-
```env:no-line-numbers
22+
```text:no-line-numbers
2323
# Database
2424
DATABASE_TYPE='postgresql'
2525
DATABASE_HOST='127.0.0.1'

docs/guide/summary/quick-start.md

+23-20
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,23 @@ title: 快速开始
2828
* MySQL 8.0+ 或 PostgreSQL 16.0 +
2929
* Redis 推荐最新稳定版
3030

31-
2. 准备 Git 仓库
31+
2. 准备 Git 仓库 <Badge type="warning" text="二选一" />
3232

33-
::: note
34-
两种方案,选择其中一种即可
35-
:::
36-
37-
1. 拉取源代码仓库
38-
39-
此方式需要你删除拉取项目后根目录下的 `.git` 文件夹,之后上传到你指定的仓库即可,具体请自行查阅你要上传平台的行为准则
33+
::: tabs
34+
@tab 拉取源代码
4035

41-
```shell:no-line-numbers
42-
git clone https://github.com/fastapi-practices/fastapi_best_architecture.git
43-
```
36+
```shell:no-line-numbers
37+
git clone https://github.com/fastapi-practices/fastapi_best_architecture.git
38+
```
4439

45-
2. 创建模板仓库
40+
@tab 创建模板仓库
4641

47-
此项目支持创建模板仓库,意味着,你可以直接创建一个非 fork(独立无绑定的关系)的个人仓库,如果所示,进入此项目
48-
GitHub 首页,
49-
使用 `use this template` 按钮创建即可,创建完成之后,使用 `git clone` 命令拉取你自己的仓库即可
42+
此项目支持创建模板仓库,意味着,你可以直接创建一个非 fork 的个人仓库,如图所示,进入此项目
43+
GitHub 首页,
44+
使用 `use this template` 按钮创建即可,创建完成之后,使用 `git clone` 命令拉取你自己的仓库即可
5045

51-
![use_this_template](/images/use_this_template.png)
46+
![use_this_template](/images/use_this_template.png)
47+
:::
5248

5349
3. 安装依赖包
5450

@@ -57,7 +53,12 @@ title: 快速开始
5753
拉取项目到本地后,在项目根目录,执行以下命令安装架构依赖
5854

5955
::: code-tabs
60-
@tab <Icon name="material-icon-theme:uv" />uv
56+
@tab <Icon name="material-icon-theme:uv" />uv - pip
57+
```shell:no-line-numbers
58+
uv pip install -r requirements.txt
59+
```
60+
61+
@tab <Icon name="material-icon-theme:uv" />uv - sync
6162
```shell:no-line-numbers
6263
uv sync --frozen
6364
```
@@ -72,11 +73,11 @@ title: 快速开始
7273
7374
执行 `backend/scripts/init_plugin.py` 文件安装插件依赖
7475
75-
4. 创建数据库:`fba`,选择 utf8mb4 编码PostgreSQL 用户可忽略编码
76+
4. 创建数据库:`fba`,选择 utf8mb4 编码PostgreSQL 用户可忽略编码
7677
5. 启动 Redis
7778
6. env
7879
79-
在 `backend` 目录中,创建环境变量文件
80+
在 `backend` 目录打开终端,执行以下命令创建环境变量文件
8081
8182
```shell:no-line-numbers
8283
touch .env
@@ -89,7 +90,7 @@ title: 快速开始
8990
```
9091

9192
7. 按需修改配置文件 `backend/core/conf.py``.env`
92-
8. 创建数据库表三选一
93+
8. 创建数据库表 <Badge type="warning" text="三选一" />
9394

9495
::: tabs
9596
@tab 自动创建
@@ -112,6 +113,8 @@ title: 快速开始
112113

113114
9. 启动 celery worker, beat 和 flower <Badge type="warning" text="此步骤为可选" />
114115

116+
`backend` 目录打开终端,执行以下创建启动 celery 相关服务
117+
115118
::: code-tabs
116119
@tab Worker
117120
```shell:no-line-numbers

docs/guide/summary/vscode.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ title: vscode
88

99
## DEBUG
1010

11-
以下是 vscode 中的 launch.json 配置
11+
如果你想在 vscode 中对 fba 进行调试,请创建 `.vscode/launch.json` 文件并添加以下配置
1212

13-
```json5
13+
```json
1414
{
1515
"version": "0.2.0",
1616
"configurations": [

docs/guide/summary/why.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import NpmBadge from 'vuepress-theme-plume/features/NpmBadge.vue'
1212
::: note
1313
我们不会去对比任何其他架构,我们认为每个架构都有自己的特点,适用于不同的场景。
1414

15-
但 fba 绝对是开源架构中代码==最干净,最规范且最令人赏心悦目=={.note}的项目之一
15+
但 fba 绝对是开源架构中==代码最干净,最规范且最令人赏心悦目的项目之一=={.note}
1616
:::
1717

1818
## 目标

docs/planet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: 知识星球
1111

1212
::: details 如果您觉得还不错,欢迎正式加入订阅
1313
<div align="center">
14-
<p style="color: #fd7600">我们在节假日会在 Discord 统一发送大额优惠券,敬请关注</p>
14+
<p style="color: #fd7600">我们在节假日会在 Discord 社区统一发送大额优惠券,敬请关注</p>
1515
<img height="349" width="415" src="https://wu-clan.github.io/picx-images-hosting/知识星球.png" alt="知识星球">
1616
</div>
1717
:::

docs/plugin/before.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ title: 前言
3434

3535
## 免责声明
3636

37-
但对于付费插件作者跑路行为,我们不承担任何责任
37+
对于付费插件作者跑路行为,我们无需承担任何责任

0 commit comments

Comments
 (0)