Create
With over thousands of stores in Salla, it's a big plus to stand out visually where customers can see the uniqueness that sets one store apart from another. Salla themes allows making detailed changes to the store's look-and-feel, with the help of Salla CLI which can be leveraged by the developers to design the themes. Within this article, an explanation of how a developer can create themes by using the create
command will be provided.
๐ What you'll learn
Create Theme Methods
The developer has two alternatives when it comes to creating themes using Salla CLI: one is to create a theme using the console, and the other is to import a theme from GitHub. To see the theme creation choices, the developer must be be logged into Salla Partners Account and into his Github Account using PAT, use the command salla theme create
, which can be abbreviated to salla theme c
:
salla theme create
# Alias command for create
salla theme c
After executing the command, the following choices will be displayed on the terminal; Read the next section to know more about each option:
Create A New Theme
In the case where the option "Create a theme" is selected, the developer will be prompted to fill in a few details about the theme.
Theme details are as shown below:
Requirement | Description |
---|---|
Theme Name | Name the developer wishes to call their theme. |
Theme Description | Short description of what the theme is. |
Theme URL | URL link of the theme. |
Author email address | Developer's email account. |
Select your Github repo | Developer's list of GitHub repo. |
After entering all the required information, a local folder will be created in the developer environment for the newly created theme. It will also get Twilight Themes source code from GitHub and install it locally.
At the same time, the preview
command will be triggered. The theme details can be found in the file twilight.json
. Salla CLI command preview
is explained in this article.
:::note
Please keep in mind that the newly created theme will be created as a private repository in your GitHub account!
:::
If you do not have access to that private repository or if you are located in a region does not support accessing private repositories, you may encounter the error Error occurred while making the request
when attempting to import the theme from the GitHub repository. In case you encountered this issue, you may create the theme manually by following the below steps:
- Go to https://github.com/SallaApp/theme-raed.
- Click on "Use this template" and create a new repository.
- From your Salla Partners Portal account, create a theme and then select "Import Theme" to import the newly created repository as your Salla theme.
Import A Theme
In the other option, when the developer chooses "Import theme", a list of themes that are currently in the developer's GitHub account will be displayed. After choosing the theme the developer wishes to import, the process will proceed to create a local folder for the theme, install the packages, and run the preview
ย command to view how the theme looks on the store.ย Salla CLI command preview
is explained in this article.