Skip to content

Commit

Permalink
Integrate server guides into website guides
Browse files Browse the repository at this point in the history
  • Loading branch information
stianst committed Jan 20, 2022
1 parent 48fe36f commit a1d3c2b
Show file tree
Hide file tree
Showing 27 changed files with 523 additions and 125 deletions.
6 changes: 3 additions & 3 deletions guides/getting-started/getting-started-docker.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:title: Docker
:summary: Get started with Keycloak on Docker
:priority: 60
:guide-title: Docker
:guide-summary: Get started with Keycloak on Docker
:guide-priority: 60

:containerCommand: docker

Expand Down
6 changes: 3 additions & 3 deletions guides/getting-started/getting-started-kube.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:title: Kubernetes
:summary: Get started with Keycloak on Kubernetes
:priority: 100
:guide-title: Kubernetes
:guide-summary: Get started with Keycloak on Kubernetes
:guide-priority: 100

:links-admin-console: Keycloak Admin Console
:links-account-console: Keycloak Account Console
Expand Down
6 changes: 3 additions & 3 deletions guides/getting-started/getting-started-openshift.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:title: Openshift
:summary: Get started with Keycloak on Openshift
:priority: 110
:guide-title: Openshift
:guide-summary: Get started with Keycloak on Openshift
:guide-priority: 110

:links-admin-console: Keycloak Admin Console
:links-account-console: Keycloak Account Console
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:title: Kubernetes Operator
:summary: Get started with Keycloak Operator on Kubernetes
:priority: 150
:guide-title: Kubernetes Operator
:guide-summary: Get started with Keycloak Operator on Kubernetes
:guide-priority: 150

## Before you start

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:title: OpenShift Operator
:summary: Get started with Keycloak Operator on Openshift
:priority: 160
:guide-title: OpenShift Operator
:guide-summary: Get started with Keycloak Operator on Openshift
:guide-priority: 160

## Before you start

Expand Down
6 changes: 3 additions & 3 deletions guides/getting-started/getting-started-podman.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:title: Podman
:summary: Get started with Keycloak on Podman
:priority: 70
:guide-title: Podman
:guide-summary: Get started with Keycloak on Podman
:guide-priority: 70

:containerCommand: podman

Expand Down
6 changes: 3 additions & 3 deletions guides/getting-started/getting-started-zip.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:title: OpenJDK
:summary: Get started with Keycloak on bare metal
:priority: 10
:guide-title: OpenJDK
:guide-summary: Get started with Keycloak on bare metal
:guide-priority: 10

:links-local: true
:links-admin-console: http://localhost:8080/auth/admin[Keycloak Admin Console, window="_blank"]
Expand Down
4 changes: 2 additions & 2 deletions guides/securing-apps/apisix.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:title: Apache APISIX
:summary: Integrate Keycloak for Authentication with Apache APISIX
:guide-title: Apache APISIX
:guide-summary: Integrate Keycloak for Authentication with Apache APISIX
:external-link: https://apisix.apache.org/blog/2021/12/10/integrate-keycloak-auth-in-apisix
4 changes: 2 additions & 2 deletions guides/securing-apps/krakend.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:title: KrakenD
:summary: Secure APIs with an API Gateway
:guide-title: KrakenD
:guide-summary: Secure APIs with an API Gateway
:external-link: https://www.krakend.io/docs/authorization/keycloak/
4 changes: 2 additions & 2 deletions guides/securing-apps/vue.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:title: Vue.js
:summary: Secure a Vue.js single-page application with Keycloak
:guide-title: Vue.js
:guide-summary: Secure a Vue.js single-page application with Keycloak
:community: true
:author: akoserwal

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"dependencies": {
"bootstrap": "5.1.x",
"@fortawesome/fontawesome-free": "5.15.4"
"@fortawesome/fontawesome-free": "5.15.4",
"tocbot": "4.18.0"
}
}
47 changes: 0 additions & 47 deletions pages/getting-started.ftl

This file was deleted.

59 changes: 59 additions & 0 deletions pages/guides.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<#import "/templates/template.ftl" as tmpl>

<@tmpl.page current="guides" title="Guides">

<script src="${links.getResource('js/guides.js')}" type="text/javascript"></script>

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<ul class="nav navbar-nav">
<#list guides.categories as c>
<li>
<a class="nav-link" href="#${c.id}">${c.label}</a>
</li>
</#list>
</ul>
<div class="float-right">
<form>
<input id="guide-search" class="form-control" type="text" placeholder="Search" aria-label="Search">
</form>
</div>
</div>
</nav>

<div class="jumbotron jumbotron-fluid kc-bg-triangles pt-4">
<div class="container">
<#list guides.categories as c>
<div class="row guide-category" id="${c.id}">
<h2>${c.label}</h2>
<#list guides.getGuides(c) as g>
<div class="col-sm-4">
<div class="card shadow-sm mb-4">
<div class="card-body">
<h5 class="card-title">
${g.title}
<#if g.community><span class="float-end badge bg-primary fs-xsmall"><i class="fa fa-users"></i> community</span></#if>
<#if g.external><span class="float-end badge bg-primary fs-xsmall"><i class="fa fa-link"></i> external</span></#if>
</h5>
<#if g.summary??>
<span class="card-text">${g.summary}</span>
</#if>
<div>
<#if g.tags??>
<#list g.tags as tag>
<span class="badge bg-light text-muted fs-xsmall mt-3">${tag}</span>
</#list>
</#if>
</div>
<a href="${links.get(g)}" <#if g.external>target="_blank"</#if> class="stretched-link link-dark"></a>
</div>
</div>
</div>
</#list>
</div>
</#list>
</div>
</div>
</div>

</@tmpl.page>
49 changes: 48 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.keycloak.web</groupId>
<artifactId>KeycloakWebBuilder</artifactId>
<version>1.0-SNAPSHOT</version>
<version>17.0.0-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -20,13 +20,16 @@
<version.commons-io>2.11.0</version.commons-io>
<version.commons-compress>1.21</version.commons-compress>

<version.keycloak>${project.version}</version.keycloak>

<version.frontend-maven-plugin>1.12.1</version.frontend-maven-plugin>
<version.node>v16.13.1</version.node>
<version.npm>8.1.2</version.npm>
<version.maven-resources-plugin>3.2.0</version.maven-resources-plugin>
<version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
<version.maven-jar-plugin>3.1.2</version.maven-jar-plugin>
<version.exec-maven-plugin>3.0.0</version.exec-maven-plugin>
<version.dependency-plugin>3.1.2</version.dependency-plugin>
</properties>

<dependencies>
Expand Down Expand Up @@ -119,6 +122,8 @@
<include>@fortawesome/fontawesome-free/css/brands.min.css</include>
<include>@fortawesome/fontawesome-free/css/all.min.css</include>
<include>@fortawesome/fontawesome-free/webfonts/*</include>
<include>tocbot/dist/tocbot.css</include>
<include>tocbot/dist/tocbot.min.js</include>
</includes>
</resource>
</resources>
Expand Down Expand Up @@ -169,6 +174,48 @@
</build>

<profiles>
<profile>
<id>server-guides</id>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-guides</artifactId>
<version>${version.keycloak}</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${version.dependency-plugin}</version>
<executions>
<execution>
<id>unpack</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-guides</artifactId>
<version>17.0.0-SNAPSHOT</version>
<classifier>asciidoc</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>auto-run</id>
<build>
Expand Down
Loading

0 comments on commit a1d3c2b

Please sign in to comment.