📚 Clarify manifest version 2 for relative plugin asset paths (#8992)

Signed-off-by: Clayton <claytonlin1110@gmail.com>
This commit is contained in:
Clayton 2026-04-15 03:38:53 -05:00 committed by GitHub
parent b0caa15516
commit 5dec75fe62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 2 deletions

View File

@ -219,8 +219,9 @@ Now that everything is in place you need a <code class="language-js">manifest.js
{ {
"name": "Plugin name", "name": "Plugin name",
"description": "Plugin description", "description": "Plugin description",
"code": "/plugin.js", "version": 2,
"icon": "/icon.png", "code": "plugin.js",
"icon": "icon.png",
"permissions": [ "permissions": [
"content:read", "content:read",
"content:write", "content:write",
@ -234,6 +235,13 @@ Now that everything is in place you need a <code class="language-js">manifest.js
} }
``` ```
<p class="advice">
Use <code class="language-js">"version": 2</code> when your
<code class="language-js">code</code> and <code class="language-js">icon</code> values
are relative paths. Version 2 resolves these assets from the manifest location.
If omitted, Penpot treats the manifest as version 1.
</p>
### Icon ### Icon
The plugin icon must be an image file. All image formats are valid, so you can use whichever format works best for your needs. Although there is no specific size requirement, it is recommended that the icon be 56x56 pixels in order to ensure its optimal appearance across all devices. The plugin icon must be an image file. All image formats are valid, so you can use whichever format works best for your needs. Although there is no specific size requirement, it is recommended that the icon be 56x56 pixels in order to ensure its optimal appearance across all devices.

View File

@ -131,6 +131,7 @@ The <code class="language-js">manifest.json</code> file contains the basic infor
{ {
"name": "Your plugin name", "name": "Your plugin name",
"description": "Your plugin description", "description": "Your plugin description",
"version": 2,
"code": "plugin.js", "code": "plugin.js",
"icon": "Your icon", "icon": "Your icon",
"permissions": [ "permissions": [
@ -147,6 +148,12 @@ The <code class="language-js">manifest.json</code> file contains the basic infor
} }
``` ```
<p class="advice">
Set <code class="language-js">"version": 2</code> in your
<code class="language-js">manifest.json</code> if you use relative paths for
<code class="language-js">code</code> or <code class="language-js">icon</code>.
</p>
#### Properties #### Properties
- **Name and description**: your plugin's basic information, which will be displayed in the plugin manager modal. - **Name and description**: your plugin's basic information, which will be displayed in the plugin manager modal.