How do I create a custom theme?

If you've created a custom .yml config file you can build a theme by referencing it as the --config, for example if you created your file in the root of your project you can run:

php artisan theme:build your_theme_name --config=custom.yml

 

Additional information

When running the theme build command you will be prompted to run npm run init this will compile your theme styles upon build and is therefore recommended. This will be followed by a prompt to enable the theme, if you choose not to enable the theme this can be done later.

It's possible to confirm these prompts during the install by adding the following options to the end of your command:

Option Description
-e Enable the theme
-r Compile styles
-er Enable the theme & compile styles

 

For example:

php artisan theme:build your_theme_name --config=vendor/aerocommerce/theme-ui/config/shadow.yml -er

 

Switching between themes

To switch theme you can do so by adding/updating this line of your .env file:

AERO_THEME=your_theme_name

Articles in this section

Was this article helpful?
0 out of 0 found this helpful