Links
📖

Build options

CLI options

Options that can be passed to the npx build-keycloak-theme command.

--external-assets

This is for performance optimisation.
Build the theme without bundling the assets (static js files, images ect). Keycloakify will read the package.json -> homepage field to know from where the assets should be downloaded.
This enable to you to enable CDN and enable big shared file to be cached by the user's browser.
Step to make --external-assets work:
Checkout a complete setup here​

--silent

Prevent the build command from generating outputs.

package.json options

You can read here the package.json fields that are used by Keyclaokify.

keycloakify.extraPages

Tells Keycloakify to generate extra pages.
If you have in your package.json:
{
"keycloakify": {
"extraPages": [
"my-extra-page-1.ftl",
"my-extra-page-2.ftl"
]
}
}
Keycloakify will generate my-extra-page-1.ftl and my-extra-page-2.ftl alongside login.ftl, register-user-profile.ftl ect...

keycloakify.extraThemeProperties

By default the theme.properties files located in build_keycloak/src/main/resources/theme/<your app>/login/theme.properties only contains:
parent=keycloak
If, for some reason, you need to add extra properties like for example env=dev you can do it by editing your package.json this way:
{
"keycloakify": {
"extraThemeProperties": [
"env=dev"
]
}
}

keycloakify.areAppAndKeycloakServerSharingSameDomain

This option is only considered when building with --external-assets.
Set to true it tels Keycloakify that you have configured your reverse proxy so that your app and your Keycloak server are under the same domain, example:
  • https://example.com/auth: Keycloak.
  • https://example.com/x/y/z: Your App
Example:
{
"keycloakify": {
"areAppAndKeycloakServerSharingSameDomain": true
}
}
When enabled you don't need to specify a homepage field in the package.json