967 B
967 B
keycloak-webjar-provider
Keycloak Provider for serving static assets from Webjars
How to use Webjars in your theme
- Download the Webjar you need in your theme from the internet and place the JAR (and its dependencies) in the
Keycloak
/opt/keycloak/providers
folder - Easiest way to download is to use Gradle/Maven (See build.gradle composeProviders task in this project)
- In your Keycloak theme add a reference to the css and script files you want to include:
//theme.properties styles=webjars/uikit/3.17.9/css/uikit.min.css scripts=webjars/htmx.org/1.9.2/dist/htmx.min.js
- These static assets will then automatically be loaded for your theme
How to build this provider
To use this provider in Keycloak run the following command:
Unix/Mac: ./gradlew jar
Windows: gradlew.bat jar
The copy the jar from build/libs/
folder into your Keycloak /opt/keycloak/providers
folder and restart Keycloak.