diff --git a/docs/plugins/create-a-plugin.md b/docs/plugins/create-a-plugin.md index 42fc096dbe..9a25d101b9 100644 --- a/docs/plugins/create-a-plugin.md +++ b/docs/plugins/create-a-plugin.md @@ -219,8 +219,9 @@ Now that everything is in place you need a 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 manifest.js } ``` +

+Use "version": 2 when your +code and icon values +are relative paths. Version 2 resolves these assets from the manifest location. +If omitted, Penpot treats the manifest as version 1. +

+ ### 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. diff --git a/docs/plugins/getting-started.md b/docs/plugins/getting-started.md index abfbc508b1..ea993640a9 100644 --- a/docs/plugins/getting-started.md +++ b/docs/plugins/getting-started.md @@ -131,6 +131,7 @@ The manifest.json file contains the basic infor { "name": "Your plugin name", "description": "Your plugin description", + "version": 2, "code": "plugin.js", "icon": "Your icon", "permissions": [ @@ -147,6 +148,12 @@ The manifest.json file contains the basic infor } ``` +

+Set "version": 2 in your +manifest.json if you use relative paths for +code or icon. +

+ #### Properties - **Name and description**: your plugin's basic information, which will be displayed in the plugin manager modal.