Skip to content

Commit 4e93d21

Browse files
committed
Improve documentation in README
Closes keycloak#503 Signed-off-by: Jon Koops <[email protected]>
1 parent 15182c2 commit 4e93d21

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
# Sources for keycloak.org
22

3-
Can be built locally from IDE by running AutoBuilder main method or with Maven by running:
3+
Can be built locally from IDE by running `AutoBuilder` main method or with Maven by running:
44

5-
mvn clean install
6-
7-
After the build is completed open `target/web/index.html` in your favourite web browser.
8-
9-
There's also an auto-builder utility that watches the filesystem and continuously rebuilds the website. This can be very useful when working on the website, especially making stylesheet changes, etc. This can be run from your IDE by running `AutoBuilder`, or from the command-line with:
5+
```sh
6+
KC_URL=http://localhost:8080 mvn clean install
7+
```
108

11-
mvn -Pauto-run exec:java
9+
Once built you can serve the `target/web` directory from a local web server, for example using [http-server](https://www.npmjs.com/package/http-server):
1210

13-
To serve the website locally with a web browser specify the base URL with `KC_URL`:
11+
```sh
12+
npx http-server target/web
13+
```
1414

15-
export KC_URL=http://localhost:8000
16-
mvn install
15+
To serve the website locally from a different domain or port you can set the base URL with the `KC_URL` environment variable.
1716

17+
There's also an auto-builder utility that watches the filesystem and continuously rebuilds the website. This can be very useful when working on the website, especially making stylesheet changes, etc. This can be run from your IDE by running `AutoBuilder`, or from the command-line with:
18+
19+
```sh
20+
mvn -Pauto-run exec:java
21+
```
22+
1823
Finally, when building the website to be published you need to include `-Dpublish`. This should usually not be done manually though as there is a GitHub Action that takes care of building and publishing to `https://github.com/keycloak/keycloak.github.io`.
1924

2025
## Server and Operator guides
2126

2227
Server and Operator guide sources are located at `https://github.com/keycloak/keycloak/tree/main/docs/guides` and are retrieved as a Maven dependency. By default the latest released version is used, but if you want to build the website with the latest guides from `main` first build the guides:
2328

24-
git clone https://github.com/keycloak/keycloak
25-
cd keycloak
26-
mvn -pl docs clean install
29+
```sh
30+
git clone https://github.com/keycloak/keycloak
31+
cd keycloak
32+
mvn -pl docs clean install
33+
```
2734

2835
Then simply build the website locally with `mvn clean install`, and the locally built guides will be available in `target/web/nightly/guides.html`.

0 commit comments

Comments
 (0)