You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-57Lines changed: 46 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,9 @@
4
4
5
5
## Get started
6
6
7
-
* Make a copy of this repo as a template with the <kbd>Use this template</kbd> button, please note that the repo name
8
-
must be the same as the plugin name, the default branch must be `main`
9
-
* Clone your repo to a local development folder. For convenience, you can place this folder in
10
-
your `{workspace}/data/plugins/` folder
11
-
* Install [NodeJS](https://nodejs.org/en/download) and [pnpm](https://pnpm.io/installation), then run `pnpm i` in the
12
-
command line under your repo folder
7
+
* Make a copy of this repo as a template with the <kbd>Use this template</kbd> button, please note that the repo name must be the same as the plugin name, the default branch must be `main`
8
+
* Clone your repo to a local development folder. For convenience, you can place this folder in your `{workspace}/data/plugins/` folder
9
+
* Install [NodeJS](https://nodejs.org/en/download) and [pnpm](https://pnpm.io/installation), then run `pnpm i` in the command line under your repo folder
13
10
* Execute `pnpm run dev` for real-time compilation
14
11
* Open SiYuan marketplace and enable plugin in downloaded tab
15
12
@@ -31,59 +28,56 @@ In terms of internationalization, our main consideration is to support multiple
31
28
complete the following tasks:
32
29
33
30
* Meta information about the plugin itself, such as plugin description and readme
34
-
*`description` and `readme` fields in plugin.json, and the corresponding README*.md file
31
+
*`displayName`,`description` and `readme` fields in plugin.json, and the corresponding README*.md file
35
32
* Text used in the plugin, such as button text and tooltips
36
-
* src/i18n/*.json language configuration files
37
-
* Use `this.i18.key` to get the text in the code
38
-
* Finally, declare the language supported by the plugin in the `i18n` field in plugin.json
33
+
* src/i18n/*.json language configuration files
34
+
* Use `this.i18.key` to get the text in the code
39
35
40
-
It is recommended that the plugin supports at least English and Simplified Chinese, so that more people can use it more
41
-
conveniently.
36
+
It is recommended that the plugin supports at least English and Simplified Chinese, so that more people can use it more conveniently. Unsupported languages do not need to be declared in the `displayName`, `description` and `readme` fields in plugin.json.
*`name`: Plugin name, must be the same as the repo name, and must be unique globally (no duplicate plugin names in the
81
-
marketplace)
75
+
*`name`: Plugin package name, must be the same as the GitHub repository name, and cannot be duplicated with other plugins in the marketplace
82
76
*`author`: Plugin author name
83
77
*`url`: Plugin repo URL
84
-
*`version`: Plugin version number, it is recommended to follow the [semver](https://semver.org/) specification
85
-
*`minAppVersion`: Minimum version number of SiYuan required to use this plugin
86
-
*`disabledInPublish`: Whether to diable the plugin in publish service
78
+
*`version`: Plugin version number, needs to follow the [semver](https://semver.org/) specification
79
+
*`minAppVersion`: Minimum SiYuan version required to use this plugin
80
+
*`disabledInPublish`: Whether to disable the plugin when using the publish service, defaults to false, i.e., not disabled
87
81
*`backends`: Backend environment required by the plugin, optional values are `windows`, `linux`, `darwin`, `docker`, `android`, `ios`, `harmony` and `all`
88
82
*`windows`: Windows desktop
89
83
*`linux`: Linux desktop
@@ -100,46 +94,44 @@ conveniently.
100
94
*`browser-desktop`: Desktop browser
101
95
*`browser-mobile`: Mobile browser
102
96
*`all`: All environments
103
-
*`displayName`: Template display name, mainly used for display in the marketplace list, supports multiple languages
104
-
*`default`: Default language, must exist
105
-
*`zh_CN`, `en_US` and other languages: optional, it is recommended to provide at least Chinese and English
106
-
*`description`: Plugin description, mainly used for display in the marketplace list, supports multiple languages
107
-
*`default`: Default language, must exist
108
-
*`zh_CN`, `en_US` and other languages: optional, it is recommended to provide at least Chinese and English
109
-
*`readme`: readme file name, mainly used to display in the marketplace details page, supports multiple languages
110
-
*`default`: Default language, must exist
111
-
*`zh_CN`, `en_US` and other languages: optional, it is recommended to provide at least Chinese and English
112
-
*`funding`: Plugin sponsorship information
113
-
*`openCollective`: Open Collective name
114
-
*`patreon`: Patreon name
115
-
*`github`: GitHub login name
116
-
*`custom`: Custom sponsorship link list
117
-
*`keywords`: Search keyword list, used for marketplace search function
97
+
*`displayName`: Plugin name, displayed in the marketplace list
98
+
*`default`: Default language, must exist. If the plugin supports English, English should be used here
99
+
*`zh_CN`, `en_US` and other languages: optional
100
+
*`description`: Plugin description, displayed in the marketplace list
101
+
*`default`: Default language, must exist. If the plugin supports English, English should be used here
102
+
*`zh_CN`, `en_US` and other languages: optional
103
+
*`readme`: Readme file name, displayed in the marketplace details page
104
+
*`default`: Default language, must exist. If the plugin supports English, English should be used here
105
+
*`zh_CN`, `en_US` and other languages: optional
106
+
*`funding`: Plugin sponsorship information, only one type will be displayed in the marketplace
107
+
*`openCollective`: Open Collective name
108
+
*`patreon`: Patreon name
109
+
*`github`: GitHub login name
110
+
*`custom`: Custom sponsorship link list
111
+
*`keywords`: Search keyword list, used for marketplace search function, supplements search keywords beyond the values of `name`, `author`, `displayName`, and `description` fields
118
112
119
113
## Package
120
114
121
115
No matter which method is used to compile and package, we finally need to generate a package.zip, which contains at
122
116
least the following files:
123
117
124
-
* i18n/*
125
-
* icon.png (160*160)
118
+
* i18n/* (If the plugin supports multiple languages, language files need to be packaged to this directory, otherwise this directory is not needed)
119
+
* icon.png (recommended size: 160*160, file size should not exceed 20KB)
126
120
* index.css
127
121
* index.js
128
122
* plugin.json
129
-
* preview.png (1024*768)
123
+
* preview.png (recommended size: 1024*768, file size should not exceed 200KB)
130
124
* README*.md
131
125
132
126
## List on the marketplace
133
127
134
-
*`pnpm run build` to generate package.zip
128
+
*Execute `pnpm run build` to generate package.zip
135
129
* Create a new GitHub release using your new version number as the "Tag version". See here for an
* Upload the file package.zip as binary attachments
138
132
* Publish the release
139
133
140
-
If it is the first release, please create a pull request to
141
-
the [Community Bazaar](https://github.com/siyuan-note/bazaar) repository and modify the plugins.json file in it. This
142
-
file is the index of all community plugin repositories, the format is:
134
+
If this is the first release, you also need to create a PR to the [Community Bazaar](https://github.com/siyuan-note/bazaar) repository and modify the plugins.json file in it. This file is the index of all community plugin repositories, the format is:
143
135
144
136
```json
145
137
{
@@ -149,12 +141,9 @@ file is the index of all community plugin repositories, the format is:
149
141
}
150
142
```
151
143
152
-
After the PR is merged, the bazaar will automatically update the index and deploy through GitHub Actions. When releasing
153
-
a new version of the plugin in the future, you only need to follow the above steps to create a new release, and you
154
-
don't need to PR the community bazaar repo.
144
+
After the PR is merged, the bazaar will automatically update the index and deploy through GitHub Actions. For subsequent plugin releases, you only need to follow the above steps to create a new release, and you don't need to PR the community bazaar repository.
155
145
156
-
Under normal circumstances, the community bazaar repo will automatically update the index and deploy every hour,
157
-
and you can check the deployment status at https://github.com/siyuan-note/bazaar/actions.
146
+
Under normal circumstances, the community bazaar repository will automatically update the index and deploy every hour, and you can check the deployment status at https://github.com/siyuan-note/bazaar/actions.
0 commit comments