4. Add Custom Theme¶
Custom themes are added to a realm by
- adding the theme directory to
- selecting the theme via Admin Web UI >> Realm Settings >> Themes
Each theme is selectable based on the directory name of the theme. Themes can extend other themes.
Here are two links to get started with a custom theme:
- Currently version v2.0.0 of OSC’s Keycloak theme
can be used as a starting point for modification. This theme is based off of
keycloaktheme which itself is based off the
basetheme. Files to modify include:
login/login.ftlfile for the footer links: https://github.com/OSC/keycloak-theme/blob/v2.0.0/login/login.ftl#L63-L73
login/resources/img/ondemand-logo.pngadd a logo with this name here
login/resources/img/favicon.icoreplace with your own or remove
login/messages/messages_en.propertiesreplace text with text appropriate for your center
- See the Keycloak documentation for themes: https://www.keycloak.org/docs/latest/server_development/index.html#_themes
Remember after adding a theme you still need to configure your realm in the Keycloak admin UI to use the theme for the login pages.
Soon we will offer an ood-keycloak base theme that be easier to extended to provide most of the common themeing a site might like to perform. It will also work well for OTP views.