Skip to content

Docs: 更新文档《手动创建项目》 #3623

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

Merged
merged 25 commits into from
Aug 24, 2025
Merged

Conversation

Chen-Luan
Copy link
Contributor

@Chen-Luan Chen-Luan commented Aug 10, 2025

  • 依据平台,将原本杂糅在代码块中的指令拆分,方便各平台用户直接复制运行,无需删改指令。
  • pip install 'nonebot2[fastapi]'在 windows 平台会报错,按照平台进行了拆分和修正。
  • 其他小幅度修改增加了文章细节,方便读者理解。

Copy link
Member

不同平台建议使用 docusaurus的 Tabs组件

@Chen-Luan
Copy link
Contributor Author

已修改

@yanyongyu yanyongyu added the documentation Improvements or additions to documentation label Aug 10, 2025
@yanyongyu
Copy link
Member

mdx 才可以用组件,后缀需要改成 mdx

@Chen-Luan
Copy link
Contributor Author

done

@Chen-Luan Chen-Luan marked this pull request as draft August 10, 2025 13:59
@Chen-Luan Chen-Luan marked this pull request as ready for review August 10, 2025 14:00
Copy link
Contributor

🚀 Deployed to https://deploy-preview-3623--nonebot2.netlify.app

@jks15satoshi
Copy link
Contributor

<Tabs groupId="platform">
<TabItem value="windows" label="windows 平台" default>
```bash
pip install "nonebot2[fastapi]"
```
</TabItem>
<TabItem value="linux/macOS" label="linux/macOS">
```bash
pip install 'nonebot2[fastapi]'
```
</TabItem>
</Tabs>

这里如果统一使用 pip install "nonebot2[fastapi]" 是不是就没有必要分 tab 了?这个应该各个 shell 都能兼容吧(大概)。

@Chen-Luan
Copy link
Contributor Author

(思考)我查到linux的习惯是用单引号,就没改。要统一吗

<Tabs groupId="platform">
<TabItem value="windows" label="windows 平台" default>
```bash
pip install "nonebot2[fastapi]"
```
</TabItem>
<TabItem value="linux/macOS" label="linux/macOS">
```bash
pip install 'nonebot2[fastapi]'
```
</TabItem>
</Tabs>

这里如果统一使用 pip install "nonebot2[fastapi]" 是不是就没有必要分 tab 了?这个应该各个 shell 都能兼容吧(大概)。

@yanyongyu
Copy link
Member

在 linux 需要使用单引号来确保方括号不会被部分 shell 当作特殊字符

@jks15satoshi
Copy link
Contributor

在 linux 需要使用单引号来确保方括号不会被部分 shell 当作特殊字符

Got it.

StarHeartHunt
StarHeartHunt previously approved these changes Aug 24, 2025
@yanyongyu yanyongyu changed the title 📝 Docs: 更新文档《手动创建项目》 Docs: 更新文档《手动创建项目》 Aug 24, 2025
Updated code blocks for creating and activating virtual environments in Windows and Linux/macOS sections.
@yanyongyu yanyongyu merged commit def8c34 into nonebot:master Aug 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Development

Successfully merging this pull request may close these issues.

5 participants