mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-02-07 02:46:10 +08:00
✨ 更新文档结构,添加项目开发和扩展开发指南;修改侧边栏配置以支持新章节排序
This commit is contained in:
parent
8530e2e34a
commit
cacbea2302
@ -1,2 +1,2 @@
|
||||
litedoc nonebot_plugin_marshoai -o docs/zh/dev/api -l zh-Hans -cd class -fd func -md func -vd var -f title=%filetitle% -bu https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/
|
||||
litedoc nonebot_plugin_marshoai -o docs/en/dev/api -l en -cd class -fd func -md func -vd var -f title=%filetitle% -bu https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/
|
||||
litedoc nonebot_plugin_marshoai -o docs/zh/dev/api -l zh-Hans -cd class -fd func -md func -vd var -f title=%filetitle%,order=100 -bu https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/
|
||||
litedoc nonebot_plugin_marshoai -o docs/en/dev/api -l en -cd class -fd func -md func -vd var -f title=%filetitle%,order=100 -bu https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/
|
@ -6,18 +6,20 @@ export const gitea = {
|
||||
|
||||
export const defaultLang = 'zh'
|
||||
|
||||
const commonSidebarOptions = {
|
||||
const commonSidebarOptions: VitePressSidebarOptions = {
|
||||
collapsed: true,
|
||||
convertSameNameSubFileToGroupIndexPage: true,
|
||||
useTitleFromFrontmatter: true,
|
||||
useFolderTitleFromIndexFile: false,
|
||||
useFolderLinkFromIndexFile: true,
|
||||
includeFolderIndexFile: true,
|
||||
useTitleFromFileHeading: true,
|
||||
rootGroupText: 'MARSHOAI',
|
||||
includeFolderIndexFile: true,
|
||||
sortMenusByFrontmatterOrder: true,
|
||||
}
|
||||
|
||||
export function generateSidebarConfig(): VitePressSidebarOptions[] {
|
||||
let sections = ["dev"]
|
||||
let sections = ["dev", "start"]
|
||||
let languages = ['zh', 'en']
|
||||
let ret: VitePressSidebarOptions[] = []
|
||||
for (let language of languages) {
|
||||
|
0
docs/en/start/index.md
Normal file
0
docs/en/start/index.md
Normal file
0
docs/en/start/install.md
Normal file
0
docs/en/start/install.md
Normal file
@ -1,4 +1,5 @@
|
||||
---
|
||||
order: 100
|
||||
title: index
|
||||
collapsed: true
|
||||
---
|
||||
|
5
docs/zh/dev/extension.md
Normal file
5
docs/zh/dev/extension.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
order: 2
|
||||
---
|
||||
|
||||
# 扩展开发
|
@ -1 +0,0 @@
|
||||
# DEV
|
41
docs/zh/dev/project.md
Normal file
41
docs/zh/dev/project.md
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
order: 1
|
||||
---
|
||||
|
||||
# 项目开发
|
||||
|
||||
## 先决条件
|
||||
|
||||
- `Git`
|
||||
- `Python3.10+`
|
||||
|
||||
## 准备工作
|
||||
|
||||
- 克隆仓库
|
||||
|
||||
```bash
|
||||
git clone https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git # 克隆仓库
|
||||
cd nonebot-plugin-marshoai # 切换目录
|
||||
```
|
||||
|
||||
- 安装依赖
|
||||
项目使用pdm作为依赖管理
|
||||
|
||||
```bash
|
||||
python3 -m venv venv # 或创建你自己的环境
|
||||
source venv/bin/activate # 激活虚拟环境
|
||||
pip install pdm # 安装依赖管理
|
||||
pdm install # 安装依赖
|
||||
pre-commit install # 安装 pre-commit 钩子
|
||||
```
|
||||
|
||||
## 代码规范
|
||||
|
||||
主仓库需要遵循以下代码规范
|
||||
|
||||
- [`PEP8`](https://peps.python.org/pep-0008/) 代码风格
|
||||
- [`Black`](https://black.readthedocs.io/en/stable/index.html) 代码格式化
|
||||
- [`mypy`](https://www.mypy-lang.org/) 静态类型检查
|
||||
- [`Google Docstring`](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) 文档规范
|
||||
|
||||
可以在编辑器中安装相应的插件进行辅助
|
0
docs/zh/start/index.md
Normal file
0
docs/zh/start/index.md
Normal file
0
docs/zh/start/install.md
Normal file
0
docs/zh/start/install.md
Normal file
Loading…
x
Reference in New Issue
Block a user