📝 Docs: 升级新版 NonePress 主题 (#2375)

This commit is contained in:
Ju4tCode
2023-09-27 16:00:26 +08:00
committed by GitHub
parent 7754f6da1d
commit 842c6ff4c6
234 changed files with 8759 additions and 5887 deletions

View File

@ -4,8 +4,8 @@ description: 注册适配器与指定平台交互
options:
menu:
weight: 20
category: advanced
- category: advanced
weight: 20
---
# 使用适配器
@ -158,4 +158,4 @@ is_tome: bool = event.is_tome()
## 更多
官方支持的适配器和社区贡献的适配器均可在[商店](/store)中查看。如果你想要开发自己的适配器,可以参考[开发文档](../developer/adapter-writing.md)。欢迎通过商店发布你的适配器。
官方支持的适配器和社区贡献的适配器均可在[商店](/store/adapters)中查看。如果你想要开发自己的适配器,可以参考[开发文档](../developer/adapter-writing.md)。欢迎通过商店发布你的适配器。

View File

@ -4,8 +4,8 @@ description: 通过依赖注入获取上下文信息
options:
menu:
weight: 70
category: advanced
- category: advanced
weight: 70
---
# 依赖注入
@ -472,7 +472,7 @@ async def _(x: httpx.AsyncClient = Depends(get_client)):
</TabItem>
</Tabs>
:::warning 注意
:::caution 注意
生成器作为依赖时,其中只能进行一次 `yield`,否则将会触发异常。如果对此有疑问并想探究原因,可以参考 [contextmanager](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.contextmanager) 和 [asynccontextmanager](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.asynccontextmanager) 文档。事实上NoneBot 内部就使用了这两个装饰器。
:::

View File

@ -4,8 +4,8 @@ description: 选择合适的驱动器运行机器人
options:
menu:
weight: 10
category: advanced
- category: advanced
weight: 10
---
# 选择驱动器
@ -117,7 +117,7 @@ DRIVER=~fastapi
##### `fastapi_reload`
:::warning 警告
:::caution 警告
不推荐开启该配置项,在 Windows 平台上开启该功能有可能会造成预料之外的影响!替代方案:使用 `nb-cli` 命令行工具以及参数 `--reload` 启动 NoneBot。
```bash
@ -199,7 +199,7 @@ DRIVER=~quart
##### `quart_reload`
:::warning 警告
:::caution 警告
不推荐开启该配置项,在 Windows 平台上开启该功能有可能会造成预料之外的影响!替代方案:使用 `nb-cli` 命令行工具以及参数 `--reload` 启动 NoneBot。
```bash
@ -251,7 +251,7 @@ nonebot.run(app="bot:app")
**类型:**`ForwardDriver`
:::warning 注意
:::caution 注意
本驱动器仅支持 HTTP 请求,不支持 WebSocket 连接请求。
:::
@ -265,7 +265,7 @@ DRIVER=~httpx
**类型:**`ForwardDriver`
:::warning 注意
:::caution 注意
本驱动器仅支持 WebSocket 连接请求,不支持 HTTP 请求。
:::

View File

@ -4,8 +4,8 @@ description: 自定义事件响应器存储
options:
menu:
weight: 110
category: advanced
- category: advanced
weight: 110
---
# 事件响应器存储

View File

@ -4,8 +4,8 @@ description: 事件响应器组成与内置响应规则
options:
menu:
weight: 60
category: advanced
- category: advanced
weight: 60
---
# 事件响应器进阶

View File

@ -4,8 +4,8 @@ description: 填写与获取插件相关的信息
options:
menu:
weight: 30
category: advanced
- category: advanced
weight: 30
---
# 插件信息

View File

@ -4,8 +4,8 @@ description: 编写与加载嵌套插件
options:
menu:
weight: 40
category: advanced
- category: advanced
weight: 40
---
# 嵌套插件

View File

@ -4,8 +4,8 @@ description: 使用其他插件提供的功能
options:
menu:
weight: 50
category: advanced
- category: advanced
weight: 50
---
# 跨插件访问

View File

@ -4,8 +4,8 @@ description: 添加服务端路由规则
options:
menu:
weight: 100
category: advanced
- category: advanced
weight: 100
---
# 添加路由

View File

@ -4,8 +4,8 @@ description: 在特定的生命周期中执行代码
options:
menu:
weight: 90
category: advanced
- category: advanced
weight: 90
---
# 钩子函数

View File

@ -4,8 +4,8 @@ description: 控制会话响应对象
options:
menu:
weight: 80
category: advanced
- category: advanced
weight: 80
---
# 会话更新
@ -56,4 +56,4 @@ async def _(matcher: Matcher) -> Permission:
请注意,此处为全大写字母的 `USER` 权限,它可以匹配多个会话 ID。通过这种方式我们可以实现多用户同时参与的会话。
我们已经了解了如何控制会话的更新,相信你已经能够实现更复杂的会话功能了,例如多人小游戏等等。欢迎将你的作品分享到[插件商店](/store)。
我们已经了解了如何控制会话的更新,相信你已经能够实现更复杂的会话功能了,例如多人小游戏等等。欢迎将你的作品分享到[插件商店](/store/plugins)。