From c2e15eb63a6d58a70537307ff2e63568b686784f Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 29 May 2023 15:06:00 +0800 Subject: [PATCH] :art: Add plugin config items `backends` and `frontends` https://github.com/siyuan-note/siyuan/issues/8386 --- README.md | 4 ++++ README_zh_CN.md | 4 ++++ plugin.json | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2407c37..f39ea20 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ conveniently. "url": "https://github.com/siyuan-note/plugin-sample", "version": "0.0.1", "minAppVersion": "2.9.0", + "backends": ["all"], + "frontends": ["all"], "displayName": { "default": "Plugin Sample", "zh_CN": "插件示例" @@ -76,6 +78,8 @@ conveniently. * `url`: Plugin repo URL * `version`: Plugin version number, it is recommended to follow the [semver](https://semver.org/) specification * `minAppVersion`: Minimum version number of SiYuan required to use this plugin +* `backends`: Backend environment required by the plugin, optional values are `all`, `windows`, `linux`, `darwin`, `android` and `ios` +* `frontends`: Frontend environment required by the plugin, optional values are `all`, `desktop`, `desktop-window`, `mobile`, `browser-desktop`, `browser-mobile` * `displayName`: Template display name, mainly used for display in the marketplace list, supports multiple languages * `default`: Default language, must exist * `zh_CN`, `en_US` and other languages: optional, it is recommended to provide at least Chinese and English diff --git a/README_zh_CN.md b/README_zh_CN.md index 68840ee..9b5d4f8 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -42,6 +42,8 @@ "url": "https://github.com/siyuan-note/plugin-sample", "version": "0.0.1", "minAppVersion": "2.9.0", + "backends": ["all"], + "frontends": ["all"], "displayName": { "default": "Plugin Sample", "zh_CN": "插件示例" @@ -70,6 +72,8 @@ * `url`:插件仓库地址 * `version`:插件版本号,建议遵循 [semver](https://semver.org/lang/zh-CN/) 规范 * `minAppVersion`:插件支持的最低思源笔记版本号 +* `backends`:插件需要的后端环境,可选值为 `all`, `windows`, `linux`, `darwin`, `docker`, `android` and `ios` +* `frontends`:插件需要的前端环境,可选值为 `all`, `desktop`, `desktop-window`, `mobile`, `browser-desktop`, `browser-mobile` * `displayName`:模板显示名称,主要用于模板集市列表中显示,支持多语言 * `default`:默认语言,必须存在 * `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文 diff --git a/plugin.json b/plugin.json index 63327e9..cfeeef2 100644 --- a/plugin.json +++ b/plugin.json @@ -2,8 +2,10 @@ "name": "plugin-sample", "author": "Vanessa", "url": "https://github.com/siyuan-note/plugin-sample", - "version": "0.0.6", + "version": "0.0.7", "minAppVersion": "2.9.0", + "backends": ["all"], + "frontends": ["all"], "displayName": { "default": "Plugin Sample", "zh_CN": "插件示例"