Theme Development

Intro

Theme development is supported by a php package that has artisan commands that eases theme development. There are also two existing themes to take a look at, both licensed under MIT license. Fork them and explore them to understand how LaraOne compatible theme is built.

Requirements for Development

To develop themes for LaraOne, following software is required to be installed on your local machine:

  • nodeJs
  • npm
  • theme development environment

Theme development environment

While theme is being developed Laravel-Zero is used to provide environment in which to develop the theme. Laravel-Zero is a micro-framework for console applications. It is only used during theme development, once theme has been packaged and installed, its managed by LaraOne CMS.

Package and Themes

Theme dev package used when developing new themes
Themedev Package

List of themes to study and dissect:
Ikigai Theme
Aurora Theme

The best way to get started building a theme is to study Ikigai and Aurora themes mentioned above. Aurora is smaller theme and would be a good theme to study.

Install Packages

To compile a theme and generate assets, first you need to install all node modules and packages specified in package.json

    npm install

When all packages have been installed, you are able to build theme assets.

Build assets

Run following command to build theme assets for dev environment:

    npm run dev
    

Run following command to build theme assets for production environment:

    npm run prod

Package Theme

To package theme assets and views for distribution run:

    php run theme:pack

This command will create a zip file in build folder. This file will be ready for distribution and can be directly installed by LaraOne CMS.