Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: 调整现行文档中部分章节的顺序 #3058

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/docs/advanced/adapter.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
description: 注册适配器与指定平台交互

options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 创建一个 NoneBot 项目

options:
menu:
- category: tutorial
- category: advanced
weight: 20
---

Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/dependency.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 7
description: 通过依赖注入获取上下文信息

options:
Expand Down
6 changes: 3 additions & 3 deletions website/docs/advanced/driver.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 0
sidebar_position: 1
description: 选择合适的驱动器运行机器人

options:
Expand All @@ -17,7 +17,7 @@ options:
:::

:::tip 提示
如何**安装**驱动器请参考[安装驱动器](../tutorial/store.mdx#安装驱动器)。
如何**安装**驱动器请参考[安装驱动器](../store.mdx#安装驱动器)。
:::

## 驱动器类型
Expand Down Expand Up @@ -47,7 +47,7 @@ NoneBot 中的客户端和服务端型驱动器可以相互配合使用,但服

其中,`<module>` 代表**驱动器模块路径**;`<Driver>` 代表**驱动器类名**,默认为 `Driver`;`<Mixin>` 代表**驱动器混入类名**,默认为 `Mixin`。即,我们需要选择一个主要驱动器,然后在其基础上配合使用其他驱动器的功能。主要驱动器可以为客户端或服务端类型,但混入类驱动器只能为客户端类型。

特别的,为了简化内置驱动器模块路径,我们可以使用 `~` 符号作为内置驱动器模块路径的前缀,如 `~fastapi` 代表使用内置驱动器 `fastapi`。NoneBot 内置了多个驱动器适配,但需要安装额外依赖才能使用,具体请参考[安装驱动器](../tutorial/store.mdx#安装驱动器)。常见的驱动器配置如下:
特别的,为了简化内置驱动器模块路径,我们可以使用 `~` 符号作为内置驱动器模块路径的前缀,如 `~fastapi` 代表使用内置驱动器 `fastapi`。NoneBot 内置了多个驱动器适配,但需要安装额外依赖才能使用,具体请参考[安装驱动器](../store.mdx#安装驱动器)。常见的驱动器配置如下:

```dotenv
DRIVER=~fastapi
Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/matcher-provider.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 10
sidebar_position: 11
description: 自定义事件响应器存储

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/matcher.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
description: 事件响应器组成与内置响应规则

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/plugin-info.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
description: 填写与获取插件相关的信息

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/plugin-nesting.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
description: 编写与加载嵌套插件

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/requiring.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
description: 使用其他插件提供的功能

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/routing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 9
sidebar_position: 10
description: 添加服务端路由规则

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/runtime-hook.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 9
description: 在特定的生命周期中执行代码

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/advanced/session-updating.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 8
description: 控制会话响应对象

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/appendices/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ WEATHER__COMMAND_PRIORITY=10
- **类型**: `str`
- **默认值**: `"~fastapi"`

NoneBot 运行所使用的驱动器。具体配置方法可以参考[安装驱动器](../tutorial/store.mdx#安装驱动器)和[选择驱动器](../advanced/driver.md)。
NoneBot 运行所使用的驱动器。具体配置方法可以参考[安装驱动器](../store.mdx#安装驱动器)和[选择驱动器](../advanced/driver.md)。

<Tabs groupId="configMethod">
<TabItem value="dotenv" label="dotenv" default>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/best-practice/alconna/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import TabItem from "@theme/TabItem";

## 安装插件

在使用前请先安装 `nonebot-plugin-alconna` 插件至项目环境中,可参考[获取商店插件](../../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如:
在使用前请先安装 `nonebot-plugin-alconna` 插件至项目环境中,可参考[获取商店插件](../../store.mdx#安装插件)来了解并选择安装插件的方式。如:

在**项目目录**下执行以下命令:

Expand Down
2 changes: 1 addition & 1 deletion website/docs/best-practice/data-storing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: 存储数据文件到本地

## 安装插件

在使用前请先安装 `nonebot-plugin-localstore` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如:
在使用前请先安装 `nonebot-plugin-localstore` 插件至项目环境中,可参考[获取商店插件](../store.mdx#安装插件)来了解并选择安装插件的方式。如:

在**项目目录**下执行以下命令:

Expand Down
2 changes: 1 addition & 1 deletion website/docs/best-practice/error-tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: 使用 sentry 进行错误跟踪

## 安装插件

在使用前请先安装 `nonebot-plugin-sentry` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如:
在使用前请先安装 `nonebot-plugin-sentry` 插件至项目环境中,可参考[获取商店插件](../store.mdx#安装插件)来了解并选择安装插件的方式。如:

在**项目目录**下执行以下命令:

Expand Down
2 changes: 1 addition & 1 deletion website/docs/best-practice/scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: 定时执行任务

## 安装插件

在使用前请先安装 `nonebot-plugin-apscheduler` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如:
在使用前请先安装 `nonebot-plugin-apscheduler` 插件至项目环境中,可参考[获取商店插件](../store.mdx#安装插件)来了解并选择安装插件的方式。如:

在**项目目录**下执行以下命令:

Expand Down
5 changes: 0 additions & 5 deletions website/docs/tutorial/store.mdx → website/docs/store.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
---
sidebar_position: 2
description: 从商店安装适配器和插件

options:
menu:
- category: tutorial
weight: 40
---

# 获取商店内容
Expand Down
4 changes: 2 additions & 2 deletions website/docs/tutorial/create-plugin.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 2
description: 创建并加载自定义插件

options:
Expand Down Expand Up @@ -64,7 +64,7 @@ options:
:::

:::caution 注意
如果在之前的[创建项目](./application.md)章节中手动创建了相关文件,那么你需要做出如下修改:
如果在[手动创建项目](../advanced/application.md)章节中手动创建了相关文件,那么你需要做出如下修改:

1. 在项目目录中创建一个两层文件夹 `awesome_bot/plugins`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
sidebar_position: 2
sidebar_position: 0
description: 配置编辑器以获得最佳体验

options:
menu:
- category: tutorial
weight: 20
---

# 编辑器支持
Expand Down
2 changes: 1 addition & 1 deletion website/docs/tutorial/event-data.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 5
description: 通过依赖注入获取所需事件信息

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/tutorial/handler.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 4
description: 处理接收到的特定事件

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/tutorial/matcher.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 3
description: 响应接收到的特定事件

options:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/tutorial/message.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 6
description: 处理消息序列与消息段

options:
Expand Down
Loading