Creating Themes for Liferay 7.3

Building Theme for Liferay 7.3

Overview

This article describes how to create, build and deploy a theme for Liferay 7.3

Prerequisites

You should have Liferay 7.3 (with Liferay workspace) and Node (v10.x+) installed already

Theme Creation

Navigate to [project_root]/themes folder in terminal ([project_root] - root folder of your Liferay workspace project).
Install generator-liferay-theme globally:
npm i -g generator-liferay-theme
Install Yeoman (https://yeoman.io/) globally:
npm i -g yo
Create the liferay theme with yo liferay-theme command:
Answer required questions: define theme name and ID, choose deployment strategy (Local App Server), Liferay version (7.3) and site url (http://localhost:8080)

Theme Build and Deployment

Navigate to created theme folder:
cd demo-liferay-theme
Install Gulp (https://gulpjs.com/) with npm:
npm install gulp
Run npm audit fix, if you have appropriate warning message.
Build theme with gulp:
gulp build
Deploy theme with gulp:
gulp deploy
Assembled theme WAR should be deployed to deployPath directory specified in liferay-theme.json file.

Comments

Popular posts from this blog

Liferay Search Container Example

Liferay DXP - max upload file size

Liferay Keycloak integration