mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-28 00:31:14 +00:00
📝 add examples
This commit is contained in:
20
website/docs/tutorial/plugin/example.mdx
Normal file
20
website/docs/tutorial/plugin/example.mdx
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
description: 简单插件示例
|
||||
---
|
||||
|
||||
import CodeBlock from "@theme/CodeBlock";
|
||||
|
||||
# 插件示例
|
||||
|
||||
## 命令式问答示例
|
||||
|
||||
import WeatherSource from "!!raw-loader!../../../../tests/examples/weather.py";
|
||||
|
||||
<CodeBlock className="language-python">{WeatherSource}</CodeBlock>
|
||||
|
||||
### 测试示例
|
||||
|
||||
import WeatherTest from "!!raw-loader!../../../../tests/test_examples/test_weather.py";
|
||||
|
||||
<CodeBlock className="language-python">{WeatherTest}</CodeBlock>
|
@ -30,6 +30,7 @@
|
||||
"docusaurus-preset-nonepress": "canary",
|
||||
"file-loader": "^6.2.0",
|
||||
"prism-react-renderer": "^1.2.1",
|
||||
"raw-loader": "^4.0.2",
|
||||
"react": "^17.0.1",
|
||||
"react-color": "^2.19.3",
|
||||
"react-dom": "^17.0.1",
|
||||
|
Reference in New Issue
Block a user