mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 00:55:07 +08:00
📝 add store base layout
This commit is contained in:
parent
0aea7f13e3
commit
39fd8b2dcd
@ -9,7 +9,7 @@ description: 插件入门
|
||||
|
||||
在编写插件之前,首先我们需要了解一下插件的概念。
|
||||
|
||||
在 NoneBot 中,插件可以是 Python 的一个模块 `module` ,也可以是一个包 `package` 。NoneBot 会在导入时对这些模块或包做一些特殊的处理使得他们成为一个插件。
|
||||
在 NoneBot 中,插件可以是 Python 的一个模块 `module` ,也可以是一个包 `package` 。NoneBot 会在导入时对这些模块或包做一些特殊的处理使得他们成为一个插件。插件间应尽量减少耦合,可以进行有限制的插件间调用,NoneBot 能够正确解析插件间的依赖关系。
|
||||
|
||||
下面详细介绍两种插件的结构:
|
||||
|
||||
|
@ -100,3 +100,7 @@ nonebot.load_from_toml("plugin_config.toml", encoding="utf-8")
|
||||
```python
|
||||
nonebot.load_builtin_plugin("echo")
|
||||
```
|
||||
|
||||
## 嵌套插件
|
||||
|
||||
<!-- TODO -->
|
||||
|
5
website/src/components/Adapter.tsx
Normal file
5
website/src/components/Adapter.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
export default function Adapter() {
|
||||
return <></>;
|
||||
}
|
5
website/src/components/Bot.tsx
Normal file
5
website/src/components/Bot.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
export default function Bot() {
|
||||
return <></>;
|
||||
}
|
5
website/src/components/Driver.tsx
Normal file
5
website/src/components/Driver.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
export default function Driver() {
|
||||
return <></>;
|
||||
}
|
5
website/src/components/Plugin.tsx
Normal file
5
website/src/components/Plugin.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
export default function Plugin() {
|
||||
return <></>;
|
||||
}
|
@ -1,3 +1,7 @@
|
||||
---
|
||||
description: Changelog
|
||||
---
|
||||
|
||||
# 更新日志
|
||||
|
||||
## v2.0.0b1
|
||||
|
@ -1 +0,0 @@
|
||||
# 商店
|
31
website/src/pages/store.mdx
Normal file
31
website/src/pages/store.mdx
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
description: NoneBot Store
|
||||
hide_table_of_contents: true
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
import Driver from "../components/Driver";
|
||||
import Adapter from "../components/Adapter";
|
||||
import Plugin from "../components/Plugin";
|
||||
import Bot from "../components/Bot";
|
||||
|
||||
# 商店
|
||||
|
||||
<div className="w-full border rounded shadow">
|
||||
<Tabs defaultValue="plugin" className="justify-center font-light text-sm">
|
||||
<TabItem value="driver" label="驱动器">
|
||||
<Driver />
|
||||
</TabItem>
|
||||
<TabItem value="adapter" label="适配器">
|
||||
<Adapter />
|
||||
</TabItem>
|
||||
<TabItem value="plugin" label="插件">
|
||||
<Plugin />
|
||||
</TabItem>
|
||||
<TabItem value="bot" label="机器人">
|
||||
<Bot />
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user