Create custom_theme_setup.md

This is a guide on how everyone should be doing their custom theme setup correctly without overwriting default pterodactyl files.
This commit is contained in:
mayed505 2019-08-24 20:08:44 +04:00 committed by GitHub
parent 8a016bb5c8
commit 8ca048e645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,49 @@
# Creating a theme for Pterodactyl
This tutorial briefly covers how to create a theme for Pterodactyl without overwriting the main theme files.
## Method 1: Using CLI
To begin, we will be using php artisan as it's the easiest and quickest method to do so. Let's begin by creating by going to your panel's main directory typically installed at `/var/www/pterodactyl`. The command below is a straight-forward setup. This setup will cover
the majority of the functions all for you such as Theme Name, Views Location, Assets Location etc. So let's create a theme!
``` bash
php artisan theme:create
```
This command will enter you into a step by step procedure. Here are the ones you would want to fill in.
::: warning Do not create the theme named as `pterodactyl` as that is Pterodactyl's main design and should NOT be overwritten. :::
``` bash
Give theme name::
> (Enter Theme Name Here) (Example: MyThemeHere or theme1)
Where will views be located? []:
> (Press Enter)
Where will assets be located? []:
> (Press Enter)
Extends an other theme? (yes/no) [no]:
> (Type No and Press Enter)
```
If you have done it correctly, the summary should be like this:
```bash
Summary:
- Theme name: (MyThemeHere)
- Views Path: /var/www/pterodactyl/resources/themes/MyThemeHere
- Asset Path: /var/www/pterodactyl/public/MyThemeHere
- Extends Theme: No
Create Theme? (yes/no) [yes]:
> (Type Yes and Press Enter)
```
If the above shows as that then Congratulations! You have created your theme correctly! Now let's set your newly created theme as default.
Go ahead and place your downloaded theme in the correct directory **without overwriting** the default Pterodactyl theme such as the following:
Your `public` folder into /var/www/pterodactyl/public/themes/MyThemeHere/
Your `pesources` folder into /var/wwww/pterodactyl/resources/themes/MyThemehere/
### Setting your theme name in .env
After creating your theme correctly and uploading the theme files correctly, you should edit your `.env` file next.
Open up your .env file and locate `APP_THEME=pterodactyl` line and change it to `APP_THEME=MyThemeHere` (case-sensitive) and save it.
If done correctly, your panel will now load your theme correctly without any issues.