diff --git a/docs/en/dev/star/plugin-publish.md b/docs/en/dev/star/plugin-publish.md index 0ffd5b80d1..e2fcd7126e 100644 --- a/docs/en/dev/star/plugin-publish.md +++ b/docs/en/dev/star/plugin-publish.md @@ -4,22 +4,42 @@ After completing your plugin development, you can choose to publish it to the As AstrBot uses GitHub to host plugins, so you'll need to push your plugin code to the GitHub plugin repository you created earlier. -You can submit your plugin by visiting the [AstrBot Plugin Marketplace](https://plugins.astrbot.app). Once on the website, click the `+` button in the bottom-right corner, fill in the basic information, author details, repository information, and other required fields. Then click the `Submit to GITHUB` button. +You can publish your plugin by visiting the [AstrBot Plugin Publish Page](https://cloud.astrbot.app/publish), You need to register an AstrBot Cloud account to publish plugins. -> [!WARNING] -> **Main repository Issue submission is deprecated**: The previous method of submitting plugins via Issues in the AstrBot main repository is no longer used. Please submit your plugin at the **[AstrBot_Plugins_Collection](https://github.com/AstrBotDevs/AstrBot_Plugins_Collection)** repository. + -You will be redirected to the AstrBot_Plugins_Collection repository's Issue submission page. Please verify that all information is correct, then click the `Create` button to complete the plugin publication process. +Here is a complete plugin metadata example (`metadata.yaml`) that the system will automatically parse: -![fill out the form](https://files.astrbot.app/docs/source/images/plugin-publish/image.png) +```yaml +name: astrbot_plugin_example # Plugin identifier, English, unique +display_name: Plugin Display Name # Plugin display name +# short_desc: A one-line summary of your plugin # (Optional) Short description for compact UI +desc: Detailed description of your plugin's features, usage, etc. # Detailed plugin description + Supports multi-line text with Markdown formatting. +version: 1.0.0 # Plugin version (follow semantic versioning) +author: Author Name # Author name +repo: https://github.com/your-name/repo # Plugin repository URL +# astrbot_version: ">=4.17.0" # (Optional) AstrBot version range +# support_platforms: # (Optional) Supported platform adapter list +# - aiocqhttp +# - qq_official +# social_link: https://github.com/your-web # (Optional) Your personal website, GitHub profile, etc. +# tags: # (Optional) Tag list for marketplace categorization and search + # - example +``` -> ⚠️ **Size Limit**: The plugin zip package submitted to the marketplace **must not exceed 16MB**. If it exceeds this limit, the CI/CD pipeline will automatically reject the submission. -> -> To ensure your plugin passes review and publication smoothly, we recommend the following: -> -> - **Compress static assets**: Compress images, audio, and other resource files in your plugin to reduce their size. -> - **Clean up unnecessary files**: Avoid including directories like `.git`, `__pycache__`, `node_modules`, or development configuration files in your plugin repository. Add a `.gitignore` file to your repository root to exclude them. -> - **Optimize dependency size**: If your plugin depends on large libraries, consider trimming them down or importing only what is needed. -> - **Use `.gitattributes` or a release branch**: Reduce the zip package size by including only the files necessary for distribution. -> -> If your plugin truly cannot be compressed to under 16MB due to business requirements, please contact the maintainer to manually bypass this limit. +[Supported platform adapters](plugin-new.md#declare-supported-platforms-optional) + +::: warning Size Limit +The plugin zip package submitted to the marketplace **must not exceed 16MB**. + +If it exceeds this limit, the CI/CD pipeline will automatically reject the submission. +::: details To ensure your plugin passes review and publication smoothly, we recommend the following: + +- **Compress static assets**: Compress images, audio, and other resource files in your plugin to reduce their size. +- **Clean up unnecessary files**: Avoid including directories like `.git`, `__pycache__`, `node_modules`, or development configuration files in your plugin repository. Add a `.gitignore` file to your repository root to exclude them. +- **Optimize dependency size**: If your plugin depends on large libraries, consider trimming them down or importing only what is needed. +- **Use `.gitattributes` or a release branch**: Reduce the zip package size by including only the files necessary for distribution. + +If your plugin truly cannot be compressed to under 16MB due to business requirements, please contact the maintainer to manually bypass this limit. +::: diff --git a/docs/zh/dev/star/plugin-publish.md b/docs/zh/dev/star/plugin-publish.md index 8c8636c01c..2dc9c50fc4 100644 --- a/docs/zh/dev/star/plugin-publish.md +++ b/docs/zh/dev/star/plugin-publish.md @@ -4,22 +4,42 @@ AstrBot 使用 GitHub 托管插件,因此你需要先将插件代码推送到之前创建的 GitHub 插件仓库中。 -你可以前往 [AstrBot 插件市场](https://plugins.astrbot.app) 提交你的插件。进入该网站后,点击右下角的 `+` 按钮,填写好基本信息、作者信息、仓库信息等内容后,点击 `提交到 GITHUB` 按钮。 +你可以前往 [AstrBot 插件发布页面](https://cloud.astrbot.app/publish) 发布你的插件,发布插件需要注册 AstrBot Cloud 账号。 -> [!WARNING] -> **主仓库 Issue 提交方式已废弃**:此前通过 AstrBot 主仓库 Issue 提交插件的方式已不再使用。现在请前往 **[AstrBot_Plugins_Collection](https://github.com/AstrBotDevs/AstrBot_Plugins_Collection)** 仓库提交你的插件。 + -你将会被导航到 AstrBot_Plugins_Collection 仓库的 Issue 提交页面,请确认信息无误后点击 `Create` 按钮提交,即可完成插件发布。 +以下是一个完整的插件元数据示例(`metadata.yaml`),系统会自动解析这些信息: -![fill out the form](https://files.astrbot.app/docs/source/images/plugin-publish/image.png) +```yaml +name: astrbot_plugin_example # 插件标识符,英文,唯一 +display_name: 示例插件名称 # 插件展示名称 +# short_desc: 一句话介绍你的插件功能 # (可选)紧凑 UI 使用的短描述 +desc: 详细描述插件的功能、特性、使用方法等信息。 # 详细描述插件的信息 + 可以写多行文本,支持 Markdown 格式。 +version: 1.0.0 # 插件版本号(遵循语义化版本规范) +author: 作者名称 # 作者名称 +repo: https://github.com/your-name/repo # 插件仓库地址 +# astrbot_version: ">=4.17.0" # (可选)支持的 AstrBot 版本范围 +# support_platforms: # (可选)支持的平台适配器列表 +# - aiocqhttp +# - qq_official +# social_link: https://github.com/your-web # (可选)你的个人网站、GitHub 主页等 +# tags: # (可选)标签列表,用于插件市场分类和搜索 + # - example +``` -> ⚠️ **大小限制**:发布到插件市场的插件压缩包(zip)大小**不得超过 16MB**。如果超过此限制,CI/CD 流水线将自动拒绝该发布请求。 -> -> 为确保你的插件能顺利通过审核和发布,建议采取以下措施: -> -> - **压缩图片等静态资源**:对插件中的图片、音频等资源文件进行压缩,减小体积。 -> - **清理不必要的文件**:避免将 `.git` 目录、`__pycache__`、`node_modules`、开发用配置文件等非必需文件提交到插件仓库中。建议在仓库根目录添加 `.gitignore` 来排除它们。 -> - **优化依赖体积**:如果插件包含体积较大的依赖库,可考虑精简或按需引入。 -> - **使用 `.gitattributes` 或发布分支**:通过只包含发布所需文件的策略来减小 zip 包体积。 -> -> 如果插件确实因业务需要无法压缩到 16MB 以内,可以联系维护者手动 bypass 此限制。 +[目前支持的平台适配器](plugin-new.md#声明支持平台-optional) + +::: warning 大小限制 +发布到插件市场的插件压缩包(zip)大小**不得超过 16MB**。 + +如果超过此限制,CI/CD 流水线将自动拒绝该发布请求。 +::: details 为确保你的插件能顺利通过审核和发布,建议采取以下措施: + +- **压缩图片等静态资源**:对插件中的图片、音频等资源文件进行压缩,减小体积。 +- **清理不必要的文件**:避免将 `.git` 目录、`__pycache__`、`node_modules`、开发用配置文件等非必需文件提交到插件仓库中。建议在仓库根目录添加 `.gitignore` 来排除它们。 +- **优化依赖体积**:如果插件包含体积较大的依赖库,可考虑精简或按需引入。 +- **使用 `.gitattributes` 或发布分支**:通过只包含发布所需文件的策略来减小 zip 包体积。 + +如果插件确实因业务需要无法压缩到 16MB 以内,可以联系维护者手动 bypass 此限制。 +:::