mirror of
https://github.com/penpot/penpot.git
synced 2026-05-24 16:38:40 -04:00
📚 Clarify manifest version 2 for relative plugin asset paths (#8992)
Signed-off-by: Clayton <claytonlin1110@gmail.com>
This commit is contained in:
@@ -219,8 +219,9 @@ Now that everything is in place you need a <code class="language-js">manifest.js
|
||||
{
|
||||
"name": "Plugin name",
|
||||
"description": "Plugin description",
|
||||
"code": "/plugin.js",
|
||||
"icon": "/icon.png",
|
||||
"version": 2,
|
||||
"code": "plugin.js",
|
||||
"icon": "icon.png",
|
||||
"permissions": [
|
||||
"content:read",
|
||||
"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
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user