readme
This commit is contained in:
parent
8b11d429da
commit
5d9805a665
2 changed files with 67 additions and 28 deletions
38
README.md
38
README.md
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
[中文版](./README_zh_CN.md)
|
[中文版](./README_zh_CN.md)
|
||||||
|
|
||||||
> Consistent with [siyuan/plugin-sample](https://github.com/siyuan-note/plugin-sample) [v0.0.6](https://github.com/siyuan-note/plugin-sample/tree/v0.0.6).
|
> Consistent with [siyuan/plugin-sample](https://github.com/siyuan-note/plugin-sample) [v0.1.3](https://github.com/siyuan-note/plugin-sample/tree/v0.1.3).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1. Using vite for packaging
|
1. Using vite for packaging
|
||||||
|
@ -62,7 +63,6 @@ complete the following tasks:
|
||||||
* Text used in the plugin, such as button text and tooltips
|
* Text used in the plugin, such as button text and tooltips
|
||||||
* src/i18n/*.json language configuration files
|
* src/i18n/*.json language configuration files
|
||||||
* Use `this.i18.key` to get the text in the code
|
* Use `this.i18.key` to get the text in the code
|
||||||
* Finally, declare the language supported by the plugin in the `i18n` field in plugin.json
|
|
||||||
|
|
||||||
It is recommended that the plugin supports at least English and Simplified Chinese, so that more people can use it more
|
It is recommended that the plugin supports at least English and Simplified Chinese, so that more people can use it more
|
||||||
conveniently.
|
conveniently.
|
||||||
|
@ -74,8 +74,10 @@ conveniently.
|
||||||
"name": "plugin-sample-vite-svelte",
|
"name": "plugin-sample-vite-svelte",
|
||||||
"author": "frostime",
|
"author": "frostime",
|
||||||
"url": "https://github.com/siyuan-note/plugin-sample-vite-svelte",
|
"url": "https://github.com/siyuan-note/plugin-sample-vite-svelte",
|
||||||
"version": "0.0.1",
|
"version": "0.1.3",
|
||||||
"minAppVersion": "2.9.0",
|
"minAppVersion": "2.8.8",
|
||||||
|
"backends": ["windows", "linux", "darwin"],
|
||||||
|
"frontends": ["desktop"],
|
||||||
"displayName": {
|
"displayName": {
|
||||||
"en_US": "Plugin sample with vite and svelte",
|
"en_US": "Plugin sample with vite and svelte",
|
||||||
"zh_CN": "插件样例 vite + svelte 版"
|
"zh_CN": "插件样例 vite + svelte 版"
|
||||||
|
@ -89,8 +91,11 @@ conveniently.
|
||||||
"zh_CN": "README.md"
|
"zh_CN": "README.md"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
|
"openCollective": "",
|
||||||
|
"patreon": "",
|
||||||
|
"github": "",
|
||||||
"custom": [
|
"custom": [
|
||||||
""
|
"https://ld246.com/sponsor"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,6 +107,21 @@ conveniently.
|
||||||
* `url`: Plugin repo URL
|
* `url`: Plugin repo URL
|
||||||
* `version`: Plugin version number, it is recommended to follow the [semver](https://semver.org/) specification
|
* `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
|
* `minAppVersion`: Minimum version number of SiYuan required to use this plugin
|
||||||
|
* `backends`: Backend environment required by the plugin, optional values are `windows`, `linux`, `darwin`, `docker`, `android`, `ios` and `all`
|
||||||
|
* `windows`: Windows desktop
|
||||||
|
* `linux`: Linux desktop
|
||||||
|
* `darwin`: macOS desktop
|
||||||
|
* `docker`: Docker
|
||||||
|
* `android`: Android APP
|
||||||
|
* `ios`: iOS APP
|
||||||
|
* `all`: All environments
|
||||||
|
* `frontends`: Frontend environment required by the plugin, optional values are `desktop`, `desktop-window`, `mobile`, `browser-desktop`, `browser-mobile` and `all`
|
||||||
|
* `desktop`: Desktop
|
||||||
|
* `desktop-window`: Desktop window converted from tab
|
||||||
|
* `mobile`: Mobile APP
|
||||||
|
* `browser-desktop`: Desktop browser
|
||||||
|
* `browser-mobile`: Mobile browser
|
||||||
|
* `all`: All environments
|
||||||
* `displayName`: Template display name, mainly used for display in the marketplace list, supports multiple languages
|
* `displayName`: Template display name, mainly used for display in the marketplace list, supports multiple languages
|
||||||
* `default`: Default language, must exist
|
* `default`: Default language, must exist
|
||||||
* `zh_CN`, `en_US` and other languages: optional, it is recommended to provide at least Chinese and English
|
* `zh_CN`, `en_US` and other languages: optional, it is recommended to provide at least Chinese and English
|
||||||
|
@ -122,13 +142,13 @@ conveniently.
|
||||||
No matter which method is used to compile and package, we finally need to generate a package.zip, which contains at
|
No matter which method is used to compile and package, we finally need to generate a package.zip, which contains at
|
||||||
least the following files:
|
least the following files:
|
||||||
|
|
||||||
* icon.png
|
* i18n/*
|
||||||
|
* icon.png (160*160)
|
||||||
|
* index.css
|
||||||
* index.js
|
* index.js
|
||||||
* plugin.json
|
* plugin.json
|
||||||
* preview.png
|
* preview.png (1024*768)
|
||||||
* README*.md
|
* README*.md
|
||||||
* index.css (optional)
|
|
||||||
* i18n/* (optional)
|
|
||||||
|
|
||||||
## List on the marketplace
|
## List on the marketplace
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
[English](./README.md)
|
[English](./README.md)
|
||||||
|
|
||||||
|
|
||||||
> 本例和 [siyuan/plugin-sample](https://github.com/siyuan-note/plugin-sample) [v0.0.6](https://github.com/siyuan-note/plugin-sample/tree/v0.0.6) 基本保持一致。
|
> 本例和 [siyuan/plugin-sample](https://github.com/siyuan-note/plugin-sample) [v0.1.3](https://github.com/siyuan-note/plugin-sample/tree/v0.1.3) 基本保持一致。
|
||||||
|
|
||||||
1. 使用 vite 打包
|
1. 使用 vite 打包
|
||||||
2. 使用符号链接、而不是把项目放到插件目录下的模式进行开发
|
2. 使用符号链接、而不是把项目放到插件目录下的模式进行开发
|
||||||
|
@ -59,7 +59,6 @@
|
||||||
* 插件中使用的文本,比如按钮文字和提示信息
|
* 插件中使用的文本,比如按钮文字和提示信息
|
||||||
* src/i18n/*.json 语言配置文件
|
* src/i18n/*.json 语言配置文件
|
||||||
* 代码中使用 `this.i18.key` 获取文本
|
* 代码中使用 `this.i18.key` 获取文本
|
||||||
* 最后在 plugin.json 中的 `i18n` 字段中声明该插件支持的语言
|
|
||||||
|
|
||||||
建议插件至少支持英文和简体中文,这样可以方便更多人使用。
|
建议插件至少支持英文和简体中文,这样可以方便更多人使用。
|
||||||
|
|
||||||
|
@ -70,8 +69,10 @@
|
||||||
"name": "plugin-sample-vite-svelte",
|
"name": "plugin-sample-vite-svelte",
|
||||||
"author": "frostime",
|
"author": "frostime",
|
||||||
"url": "https://github.com/siyuan-note/plugin-sample-vite-svelte",
|
"url": "https://github.com/siyuan-note/plugin-sample-vite-svelte",
|
||||||
"version": "0.0.1",
|
"version": "0.1.3",
|
||||||
"minAppVersion": "2.9.0",
|
"minAppVersion": "2.8.8",
|
||||||
|
"backends": ["windows", "linux", "darwin"],
|
||||||
|
"frontends": ["desktop"],
|
||||||
"displayName": {
|
"displayName": {
|
||||||
"en_US": "Plugin sample with vite and svelte",
|
"en_US": "Plugin sample with vite and svelte",
|
||||||
"zh_CN": "插件样例 vite + svelte 版"
|
"zh_CN": "插件样例 vite + svelte 版"
|
||||||
|
@ -85,8 +86,11 @@
|
||||||
"zh_CN": "README.md"
|
"zh_CN": "README.md"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
|
"openCollective": "",
|
||||||
|
"patreon": "",
|
||||||
|
"github": "",
|
||||||
"custom": [
|
"custom": [
|
||||||
""
|
"https://ld246.com/sponsor"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,6 +101,21 @@
|
||||||
* `url`:插件仓库地址
|
* `url`:插件仓库地址
|
||||||
* `version`:插件版本号,建议遵循 [semver](https://semver.org/lang/zh-CN/) 规范
|
* `version`:插件版本号,建议遵循 [semver](https://semver.org/lang/zh-CN/) 规范
|
||||||
* `minAppVersion`:插件支持的最低思源笔记版本号
|
* `minAppVersion`:插件支持的最低思源笔记版本号
|
||||||
|
* `backends`:插件需要的后端环境,可选值为 `windows`, `linux`, `darwin`, `docker`, `android`, `ios` and `all`
|
||||||
|
* `windows`:Windows 桌面端
|
||||||
|
* `linux`:Linux 桌面端
|
||||||
|
* `darwin`:macOS 桌面端
|
||||||
|
* `docker`:Docker 端
|
||||||
|
* `android`:Android 端
|
||||||
|
* `ios`:iOS 端
|
||||||
|
* `all`:所有环境
|
||||||
|
* `frontends`:插件需要的前端环境,可选值为 `desktop`, `desktop-window`, `mobile`, `browser-desktop`, `browser-mobile` and `all`
|
||||||
|
* `desktop`:桌面端
|
||||||
|
* `desktop-window`:桌面端页签转换的独立窗口
|
||||||
|
* `mobile`:移动端
|
||||||
|
* `browser-desktop`:桌面端浏览器
|
||||||
|
* `browser-mobile`:移动端浏览器
|
||||||
|
* `all`:所有环境
|
||||||
* `displayName`:模板显示名称,主要用于模板集市列表中显示,支持多语言
|
* `displayName`:模板显示名称,主要用于模板集市列表中显示,支持多语言
|
||||||
* `default`:默认语言,必须存在
|
* `default`:默认语言,必须存在
|
||||||
* `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文
|
* `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文
|
||||||
|
@ -116,13 +135,13 @@
|
||||||
|
|
||||||
无论使用何种方式编译打包,我们最终需要生成一个 package.zip,它至少包含如下文件:
|
无论使用何种方式编译打包,我们最终需要生成一个 package.zip,它至少包含如下文件:
|
||||||
|
|
||||||
* icon.png
|
* i18n/*
|
||||||
|
* icon.png (160*160)
|
||||||
|
* index.css
|
||||||
* index.js
|
* index.js
|
||||||
* plugin.json
|
* plugin.json
|
||||||
* preview.png
|
* preview.png (1024*768)
|
||||||
* README*.md
|
* README*.md
|
||||||
* index.css (optional)
|
|
||||||
* i18n/* (optional)
|
|
||||||
|
|
||||||
## 上架集市
|
## 上架集市
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue