From 77b77c285b5576827e74d8b70ae357f09a940cdc Mon Sep 17 00:00:00 2001 From: snowykami Date: Sun, 1 Sep 2024 15:31:22 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20[docs]:=20=E9=87=8D=E6=96=B0=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E5=BC=80=E5=8F=91=E6=96=87=E6=A1=A3=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config/en.ts | 2 +- docs/.vitepress/config/zh.ts | 2 +- liteyuki/__init__.py | 8 ++++++++ liteyuki/config.py | 10 +++++----- liteyuki/plugins/__init__.py | 5 +++++ 5 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 liteyuki/plugins/__init__.py diff --git a/docs/.vitepress/config/en.ts b/docs/.vitepress/config/en.ts index 438c5360..ecfab4a1 100644 --- a/docs/.vitepress/config/en.ts +++ b/docs/.vitepress/config/en.ts @@ -10,7 +10,7 @@ export const en = defineConfig({ {text: 'Deploy', link: '/en/deploy/install'}, {text: 'Usage', link: '/en/usage/basic'}, {text: 'Extension', link: '/en/store/resource'}, - {text: 'Develop', link: '/en/dev/api'}, + {text: 'Develop', link: '/en/dev/guide'}, ], docFooter: { prev: 'Prev Page', diff --git a/docs/.vitepress/config/zh.ts b/docs/.vitepress/config/zh.ts index 492b6e9c..57143ad3 100644 --- a/docs/.vitepress/config/zh.ts +++ b/docs/.vitepress/config/zh.ts @@ -10,7 +10,7 @@ export const zh = defineConfig({ {text: '部署', link: '/deploy/install'}, {text: '使用', link: '/usage/basic'}, {text: '扩展', link: '/store/resource'}, - {text: '开发', link: '/dev/api'}, + {text: '开发', link: '/dev/guide'}, ], docFooter: { prev: '上一页', diff --git a/liteyuki/__init__.py b/liteyuki/__init__.py index 626919d5..2e5385a1 100644 --- a/liteyuki/__init__.py +++ b/liteyuki/__init__.py @@ -1,3 +1,11 @@ +""" +--- +title: liteyuki API +order: 100 +--- +此模块为liteyuki的框架整体 +This module is the overall framework of liteyuki. +""" from liteyuki.bot import ( LiteyukiBot, get_bot, diff --git a/liteyuki/config.py b/liteyuki/config.py index 3ab5ad2d..b55298f6 100644 --- a/liteyuki/config.py +++ b/liteyuki/config.py @@ -1,11 +1,11 @@ """ 该模块用于常用配置文件的加载 多配置文件编写原则: -1.尽量不要冲突: 一个键不要多次出现 -2.分工明确: 每个配置文件给一个或一类服务提供配置 -3.扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 -4.注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 -5.请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式 +1. 尽量不要冲突: 一个键不要多次出现 +2. 分工明确: 每个配置文件给一个或一类服务提供配置 +3. 扁平化编写: 配置文件尽量扁平化,不要出现过多的嵌套 +4. 注意冲突时的优先级: 项目目录下的配置文件优先级高于config目录下的配置文件 +5. 请不要将需要动态加载的内容写入配置文件,你应该使用其他储存方式 """ import os diff --git a/liteyuki/plugins/__init__.py b/liteyuki/plugins/__init__.py new file mode 100644 index 00000000..8b5afb33 --- /dev/null +++ b/liteyuki/plugins/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +""" +此模块为内置插件文件夹,用于存放内置插件。 +This module is the built-in plugin folder, used to store built-in plugins. +""" \ No newline at end of file