Once your theme is
built,
you can use the gulp extend
task to change your theme’s base theme.
Follow these steps to change your base theme:
-
Navigate to your theme’s root folder and run
gulp extend
and choose option 1 to change the base theme your theme extends.Figure 1: Run the `gulp extend` task to change your base theme or install a themelet.
-
Choose which base theme you want to extend. By default, themes created with the Liferay Theme Generator are based off of the styled theme. You can extend the styled or unstyled base theme, a globally installed theme, a theme published on the npm registry, or you can specify a package URL. Enter the number for the option you wish to select.
Figure 2: You can extend the styled or unstyled base theme, a globally installed theme, or a theme published to the npm registry.
-
Your theme’s
package.json
contains the updated base theme configuration :{ ... "liferayTheme": { "baseTheme": "styled", "screenshot": "", "rubySass": false, "templateLanguage": "ftl", "version": "7.1" }, ... }
When you build your theme’s files or deploy it, your theme will inherit the updated base theme’s files.