I’ve got a custom theme for keycloak for the login and the account pages.
I inherit the
keycloak theme and make changes to that in
Where I’ve set
I want to share resources (fonts and images) across both the login and account themes.
I see that in the keycloak theme there is a
themes/keycloak/common thats used to share resources.
So I attempted the same method by creating
However when i attempt to share resources between my custom themes by setting the
stylesCommon attribute in
theme.properties i receive a MIME type error (indicating that the file can’t be found). I’ve attempted to add
theme.properties and this didn’t fix the issue.
Could anyone please point me to a working example of a custom theme, inheriting from keycloak, sharing resources between theme types?
Thank you, any help will be much appreciated.
It sounds like you’re doing the right thing.
For example, if you have a css file in
theme/mytheme/common/resources/css/my.css that you want to use in one of your themes, the
theme.properties in yourtheme should include:
it doesn’t work I have an error 500. Anyone have an idea ?
│ └── keycloak-themes.json
│ ├── *.ftl
│ └── theme.properties
│ └── resources/
│ └── css/
│ └── bootstrap.min.css
and my theme.properties (login)
# -- which I already tried
# by default keycloak use common/keycloak
# (but how to change to my own common resources ?
# I tried this import=common/my-custom-theme but I have an error 500)
stylesCommon=css/bootstrap.min.css (it's bootstrap file of keycloak (3.4.1 :/)
Where is the import in your theme.properties?
import=common/my-custom-theme (I tried this but I have an internal server error)
Do you have a public repo I/we can fork and test on? I’ve got something similar working, but without seeing your full setup, I can’t be sure it will work the same way.
Was this ever figured out? I am running into the exact same issue.
Nope. the problem is not yet solved
I got it running by adding the theme type ‘common’ to the custom theme in the keycloak-themes.json.