# keycloak-webjar-provider
Keycloak Provider for serving static assets from Webjars
## How to use Webjars in your theme
1. 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
2. Easiest way to download is to use Gradle/Maven (See build.gradle composeProviders task in this project)
3. 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.js4. 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.