This is the public repo for the new Plesk Welcome Guide.
To be able to build your own package, you must have installed in your development environment:
Run Composer to build the required autoload files
> composer install --no-dev
Use the update command to get the latest version of the dependencies.
Add required packages by running the command:
> yarn install
The configuration files are already pre-configured, thus you just need to run the following command to create the proper JavaScript file with the the React UI library included:
> yarn build
This command will update the file main.js in src/htdocs/js/.
Before bundling the extension you need to build the bundle file (see section above). If the JavaScript file was created properly, you may create the ready-to-install package with the command:
> cd src/ && zip -6r ext-welcome-guide.zip * && cd ..
It is possible to make JSON configuration more flexible by using placeholders in JSON strings. The syntax is %%placeholder%%.
Currently there is only one static placeholder %%username%%, which resolves to the current Plesk user name.
Hallo, %%username%%!" -> "Hallo, Max Mustermann!
Dynamic placeholder consists of a name and at least one parameter. Parameters are separated by | (vertical pipe) character. The syntax for dynamic placeholders is: %%name|param1|param2|paramX%%
Returns official name of an extension.
Parameters:
- Extension ID (required)
%%extname|advisor%% -> Security Advisor
Displays an image.
Parameters:
- URL (required)
- Position (optional) [left|right]
%%image|https://www.plesk.com/wp-content/uploads/2017/05/elvis_plesky.png%%
->
<img src="https://www.plesk.com/wp-content/uploads/2017/05/elvis_plesky.png" />
Provides options for formatting text.
Parameters:
- Format type (required) [bold|italic|underline]
- Text to format (required)
This is %%format|bold|important%% -> This is <strong>important</strong>
Actions are defined in separate actions
block, calls some built-in task and is referenced by buttons.
"actions": {
"action1": {
"taskId": "install",
"extensionId": "wp-toolkit"
}
}
"buttons": [
{
"actionId": "action1"
}
]
For installing or opening extension.
Parameters:
- extensionId - Extension ID (required)
- titleInstall - Title of button for installation process (optional)
- titleOpen - Title of button for open process (optional)
For opening extension.
Parameters:
- extensionId - Extension ID (required)
- title - Button text, if not set then the official extension name will be used (optional)
For opening specific URL address.
Parameters:
- title - Button text (required)
- url - URL address (required)
- newWindow - Open in new window (optional)
Shortcut for adding a new domain name.
Parameters:
- title - Button text (optional)
If more than one group is defined then tabs will appear automatically - one for each group.
"groups": [
{
"title": "First things first",
"steps": [
...
]
},
{
"title": "Secure",
"steps": [
...
]
},
{
"title": "Optimize",
"steps": [
...
]
}
]
Get a list of available presets
> plesk ext welcome --list
Show current configuration
> plesk ext welcome --show
Show current preset name
> plesk ext welcome --get-preset
Show preset configuration
> plesk ext welcome --show -preset wordpress
Update current configuration from preset
> plesk ext welcome --select -preset business
Update current configuration from URL
> plesk ext welcome --input -url http://example.com/config.json
Found a bug or had an issue? Feel free to simply open an issue on Github for us.