Skip to content

Commit cb4edc1

Browse files
committed
update readme
1 parent efa6bcf commit cb4edc1

File tree

1 file changed

+52
-40
lines changed

1 file changed

+52
-40
lines changed

README.md

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,72 @@
1-
<p align="center">
2-
<i>🚀 <a href="https://keycloakify.dev">Keycloakify</a> v11 starter 🚀</i>
3-
<br/>
4-
<br/>
5-
</p>
1+
# Keycloak DSFR Theme
62

7-
This starter is based on Vite. There is also [a Webpack based starter](https://github.com/keycloakify/keycloakify-starter-webpack).
3+
Welcome to the Keycloak DSFR Theme, a Keycloak theme with [react-dsfr](https://github.com/codegouvfr/react-dsfr) and [Keycloakify](https://www.keycloakify.dev/).
4+
To see the theme in action, please visit [the SILL](https://sill-preprod.lab.sspcloud.fr/) and attempt to log in.
5+
This theme is configurable at runtime, via providing environnement variable, there is no need to clone this repository.
6+
Simply use the bundled .jar file that is released an asset with every new [GitHub Release of this project](https://github.com/codegouvfr/keycloak-theme-dsfr/releases).
87

9-
# Quick start
8+
> NOTE: Keycloak 22 (and only this specific version) is not fully supported. In this version, only the Login theme works, not the Account theme.
109
11-
```bash
12-
git clone https://github.com/keycloakify/keycloakify-starter
13-
cd keycloakify-starter
14-
yarn install # Or use an other package manager, just be sure to delete the yarn.lock if you use another package manager.
15-
```
10+
## Preview
1611

17-
# Testing the theme locally
12+
Here are some screenshots showcasing the theme:
1813

19-
[Documentation](https://docs.keycloakify.dev/testing-your-theme)
14+
![image](https://github.com/codegouvfr/keycloak-theme-dsfr/assets/6702424/68fa56ab-8e12-441b-8400-fa657b51d400)
15+
![image](https://github.com/codegouvfr/keycloak-theme-dsfr/assets/6702424/0ef3b7f8-96f8-4f79-b956-9cc96dde67f9)
16+
![image](https://github.com/codegouvfr/keycloak-theme-dsfr/assets/6702424/f3797b8d-7111-4199-a587-af26641c30e3)
2017

21-
# How to customize the theme
18+
## Setup and Configuration
2219

23-
[Documentation](https://docs.keycloakify.dev/customization-strategies)
20+
For instruction on how to load the theme into your Keycloak instance you can [refer to this guide](https://docs.keycloakify.dev/importing-your-theme-in-keycloak).
2421

25-
# Building the theme
22+
For guidance on how to configure ProConnect/FranceConnect, you can refer to our comprehensive [setup guide](https://github.com/codegouvfr/sill-docs/blob/main/deploying.md#installing-keycloak).
2623

27-
You need to have [Maven](https://maven.apache.org/) installed to build the theme (Maven >= 3.1.1, Java >= 7).
28-
The `mvn` command must be in the $PATH.
24+
### Environment Variables
2925

30-
- On macOS: `brew install maven`
31-
- On Debian/Ubuntu: `sudo apt-get install maven`
32-
- On Windows: `choco install openjdk` and `choco install maven` (Or download from [here](https://maven.apache.org/download.cgi))
26+
Several environment variables can be used to tailor the theme to your needs:
3327

34-
```bash
35-
npm run build-keycloak-theme
28+
```env
29+
DSFR_THEME_HOME_URL
30+
DSFR_THEME_SERVICE_TITLE
31+
DSFR_THEME_BRAND_TOP
32+
DSFR_THEME_TOS_URL
33+
DSFR_THEME_CONTACT_EMAIL
3634
```
3735

38-
Note that by default Keycloakify generates multiple .jar files for different versions of Keycloak.
39-
You can customize this behavior, see documentation [here](https://docs.keycloakify.dev/targeting-specific-keycloak-versions).
36+
These variables should be made available to the process running Keycloak on your server.
37+
38+
If you are deploying Keycloak on Kubernetes using Helm, here's how to configure your settings:
39+
40+
```yaml
41+
...
42+
extraEnv: |
43+
- name: DSFR_THEME_HOME_URL
44+
value: https://code.gouv.fr
45+
- name: DSFR_THEME_SERVICE_TITLE
46+
value: CodeGouv
47+
- name: DSFR_THEME_BRAND_TOP
48+
value: "République<br/>Française"
49+
- name: DSFR_THEME_TOS_URL
50+
value: '{ "fr": "https://code.gouv.fr/sill/tos_fr.md", "en": "https://code.gouv.fr/sill/tos_en.md" }'
51+
- name: DSFR_THEME_CONTACT_EMAIL
52+
53+
- name: JAVA_OPTS
54+
value: >-
55+
-Dkeycloak.profile=preview
56+
...
57+
```
4058
41-
# Initializing the account theme
59+
## i18n
4260
43-
```bash
44-
npx keycloakify initialize-account-theme
45-
```
61+
To enable internationalization in the theme you must first enable it in Keycloak.
4662
47-
# Initializing the email theme
63+
The theme is available in French and English but there's no language select provided in the login and registration pages.
64+
It's up to you to redirect your user to the login page in the correct language by adding the `ui_locales` parameter to the login URL. (e.g.: `https://sso.code.gouv.fr/auth/realms/sill/protocol/openid-connect/auth?client_id=sill&redirect_uri=https%3A%2F%2Fsill.code.gouv.fr%2Flogin%2Fcallback&response_type=code&scope=openid&ui_locales=fr`)
4865

49-
```bash
50-
npx keycloakify initialize-email-theme
51-
```
66+
## Development
5267

53-
# GitHub Actions
68+
You can refer to the [keycloakify-starter repo](https://github.com/keycloakify/keycloakify-starter) and the [Keycloakify documentation](https://docs.keycloakify.dev) for more information on how to develop a Keycloak theme.
5469

55-
The starter comes with a generic GitHub Actions workflow that builds the theme and publishes
56-
the jars [as GitHub releases artifacts](https://github.com/keycloakify/keycloakify-starter/releases/tag/v10.0.0).
57-
To release a new version **just update the `package.json` version and push**.
70+
# License
5871

59-
To enable the workflow go to your fork of this repository on GitHub then navigate to:
60-
`Settings` > `Actions` > `Workflow permissions`, select `Read and write permissions`.
72+
This project is licensed under the [MIT License](LICENSE), courtesy of the Direction interministérielle du numérique.

0 commit comments

Comments
 (0)