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)
|
||||
|
||||
> 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
|
||||
|
@ -62,7 +63,6 @@ complete the following tasks:
|
|||
* Text used in the plugin, such as button text and tooltips
|
||||
* src/i18n/*.json language configuration files
|
||||
* 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
|
||||
conveniently.
|
||||
|
@ -74,8 +74,10 @@ conveniently.
|
|||
"name": "plugin-sample-vite-svelte",
|
||||
"author": "frostime",
|
||||
"url": "https://github.com/siyuan-note/plugin-sample-vite-svelte",
|
||||
"version": "0.0.1",
|
||||
"minAppVersion": "2.9.0",
|
||||
"version": "0.1.3",
|
||||
"minAppVersion": "2.8.8",
|
||||
"backends": ["windows", "linux", "darwin"],
|
||||
"frontends": ["desktop"],
|
||||
"displayName": {
|
||||
"en_US": "Plugin sample with vite and svelte",
|
||||
"zh_CN": "插件样例 vite + svelte 版"
|
||||
|
@ -89,8 +91,11 @@ conveniently.
|
|||
"zh_CN": "README.md"
|
||||
},
|
||||
"funding": {
|
||||
"openCollective": "",
|
||||
"patreon": "",
|
||||
"github": "",
|
||||
"custom": [
|
||||
""
|
||||
"https://ld246.com/sponsor"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -102,6 +107,21 @@ 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 `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
|
||||
* `default`: Default language, must exist
|
||||
* `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
|
||||
least the following files:
|
||||
|
||||
* icon.png
|
||||
* i18n/*
|
||||
* icon.png (160*160)
|
||||
* index.css
|
||||
* index.js
|
||||
* plugin.json
|
||||
* preview.png
|
||||
* preview.png (1024*768)
|
||||
* README*.md
|
||||
* index.css (optional)
|
||||
* i18n/* (optional)
|
||||
|
||||
## List on the marketplace
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
[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 打包
|
||||
2. 使用符号链接、而不是把项目放到插件目录下的模式进行开发
|
||||
|
@ -59,7 +59,6 @@
|
|||
* 插件中使用的文本,比如按钮文字和提示信息
|
||||
* src/i18n/*.json 语言配置文件
|
||||
* 代码中使用 `this.i18.key` 获取文本
|
||||
* 最后在 plugin.json 中的 `i18n` 字段中声明该插件支持的语言
|
||||
|
||||
建议插件至少支持英文和简体中文,这样可以方便更多人使用。
|
||||
|
||||
|
@ -70,8 +69,10 @@
|
|||
"name": "plugin-sample-vite-svelte",
|
||||
"author": "frostime",
|
||||
"url": "https://github.com/siyuan-note/plugin-sample-vite-svelte",
|
||||
"version": "0.0.1",
|
||||
"minAppVersion": "2.9.0",
|
||||
"version": "0.1.3",
|
||||
"minAppVersion": "2.8.8",
|
||||
"backends": ["windows", "linux", "darwin"],
|
||||
"frontends": ["desktop"],
|
||||
"displayName": {
|
||||
"en_US": "Plugin sample with vite and svelte",
|
||||
"zh_CN": "插件样例 vite + svelte 版"
|
||||
|
@ -85,8 +86,11 @@
|
|||
"zh_CN": "README.md"
|
||||
},
|
||||
"funding": {
|
||||
"openCollective": "",
|
||||
"patreon": "",
|
||||
"github": "",
|
||||
"custom": [
|
||||
""
|
||||
"https://ld246.com/sponsor"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -97,32 +101,47 @@
|
|||
* `url`:插件仓库地址
|
||||
* `version`:插件版本号,建议遵循 [semver](https://semver.org/lang/zh-CN/) 规范
|
||||
* `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`:模板显示名称,主要用于模板集市列表中显示,支持多语言
|
||||
* `default`:默认语言,必须存在
|
||||
* `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文
|
||||
* `default`:默认语言,必须存在
|
||||
* `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文
|
||||
* `description`:插件描述,主要用于插件集市列表中显示,支持多语言
|
||||
* `default`:默认语言,必须存在
|
||||
* `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文
|
||||
* `default`:默认语言,必须存在
|
||||
* `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文
|
||||
* `readme`:自述文件名,主要用于插件集市详情页中显示,支持多语言
|
||||
* `default`:默认语言,必须存在
|
||||
* `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文
|
||||
* `default`:默认语言,必须存在
|
||||
* `zh_CN`、`en_US` 等其他语言:可选,建议至少提供中文和英文
|
||||
* `funding`:插件赞助信息
|
||||
* `openCollective`:Open Collective 名称
|
||||
* `patreon`:Patreon 名称
|
||||
* `github`:GitHub 登录名
|
||||
* `custom`:自定义赞助链接列表
|
||||
* `openCollective`:Open Collective 名称
|
||||
* `patreon`:Patreon 名称
|
||||
* `github`:GitHub 登录名
|
||||
* `custom`:自定义赞助链接列表
|
||||
|
||||
## 打包
|
||||
|
||||
无论使用何种方式编译打包,我们最终需要生成一个 package.zip,它至少包含如下文件:
|
||||
|
||||
* icon.png
|
||||
* i18n/*
|
||||
* icon.png (160*160)
|
||||
* index.css
|
||||
* index.js
|
||||
* plugin.json
|
||||
* preview.png
|
||||
* preview.png (1024*768)
|
||||
* README*.md
|
||||
* index.css (optional)
|
||||
* i18n/* (optional)
|
||||
|
||||
## 上架集市
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue