Skip to content

Commit 26aeb09

Browse files
committed
RHIDP-6499: Modularize Learning Paths docs
1 parent 348fa6a commit 26aeb09

File tree

4 files changed

+52
-44
lines changed

4 files changed

+52
-44
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
:context: customizing-learning-paths
3+
[id="{context}"]
4+
= Customizing the Learning Paths in {product}
5+
6+
In {product}, you can configure Learning Paths by passing the data into the `{my-app-config-file}` file as a proxy. The base URL must include the `/developer-hub/learning-paths` proxy.
7+
8+
[NOTE]
9+
====
10+
Due to the use of overlapping `pathRewrites` for both the `learning-path` and `homepage` quick access proxies, you must create the `learning-paths` configuration (`^api/proxy/developer-hub/learning-paths`) before you create the `homepage` configuration (`^/api/proxy/developer-hub`).
11+
12+
For more information about customizing the Home page in {product}, see xref:customizing-the-home-page[Customizing the Home page in {product}].
13+
====
14+
15+
You can provide data to the Learning Path from the following sources:
16+
17+
* JSON files hosted on GitHub or GitLab.
18+
* A dedicated service that provides the Learning Path data in JSON format using an API.
19+
20+
include::modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-json-files.adoc[]
21+
22+
include::modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-dedicated-service.adoc[]

modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths.adoc renamed to modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-dedicated-service.adoc

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,4 @@
1-
[id='proc-customize-rhdh-learning-paths_{context}']
2-
= Customizing the Learning Paths in {product}
3-
4-
In {product}, you can configure Learning Paths by passing the data into the `{my-app-config-file}` file as a proxy. The base URL must include the `/developer-hub/learning-paths` proxy.
5-
6-
[NOTE]
7-
====
8-
Due to the use of overlapping `pathRewrites` for both the `learning-path` and `homepage` quick access proxies, you must create the `learning-paths` configuration (`^api/proxy/developer-hub/learning-paths`) before you create the `homepage` configuration (`^/api/proxy/developer-hub`).
9-
10-
For more information about customizing the Home page in {product}, see xref:customizing-the-home-page[Customizing the Home page in {product}].
11-
====
12-
13-
You can provide data to the Learning Path from the following sources:
14-
15-
* JSON files hosted on GitHub or GitLab.
16-
* A dedicated service that provides the Learning Path data in JSON format using an API.
17-
18-
== Using hosted JSON files to provide data to the Learning Paths
19-
20-
.Prerequisites
21-
22-
You have installed {product} by using either the Operator or Helm chart.
23-
For more information, see xref:{installing-on-ocp-book-url}#assembly-install-rhdh-ocp[{installing-on-ocp-book-title}].
24-
25-
.Procedure
26-
27-
To access the data from the JSON files, complete the following step:
28-
29-
* Add the following code to the `{my-app-config-file}` file:
30-
+
31-
[source,yaml]
32-
----
33-
proxy:
34-
endpoints:
35-
'/developer-hub':
36-
target: https://raw.githubusercontent.com/
37-
pathRewrite:
38-
'^/api/proxy/developer-hub/learning-paths': '/redhat-developer/rhdh/main/packages/app/public/learning-paths/data.json'
39-
'^/api/proxy/developer-hub/tech-radar': '/redhat-developer/rhdh/main/packages/app/public/tech-radar/data-default.json'
40-
'^/api/proxy/developer-hub': '/redhat-developer/rhdh/main/packages/app/public/homepage/data.json'
41-
changeOrigin: true
42-
secure: true
43-
----
1+
[id='proc-customize-rhdh-learning-paths-dedicated-service_{context}']
442

453
== Using a dedicated service to provide data to the Learning Paths
464

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[id='proc-customize-rhdh-learning-paths-json-files_{context}']
2+
3+
== Using hosted JSON files to provide data to the Learning Paths
4+
5+
.Prerequisites
6+
7+
You have installed {product} by using either the Operator or Helm chart.
8+
For more information, see xref:{installing-on-ocp-book-url}#assembly-install-rhdh-ocp[{installing-on-ocp-book-title}].
9+
10+
.Procedure
11+
12+
To access the data from the JSON files, complete the following step:
13+
14+
* Add the following code to the `{my-app-config-file}` file:
15+
+
16+
[source,yaml]
17+
----
18+
proxy:
19+
endpoints:
20+
'/developer-hub':
21+
target: https://raw.githubusercontent.com/
22+
pathRewrite:
23+
'^/api/proxy/developer-hub/learning-paths': '/redhat-developer/rhdh/main/packages/app/public/learning-paths/data.json'
24+
'^/api/proxy/developer-hub/tech-radar': '/redhat-developer/rhdh/main/packages/app/public/tech-radar/data-default.json'
25+
'^/api/proxy/developer-hub': '/redhat-developer/rhdh/main/packages/app/public/homepage/data.json'
26+
changeOrigin: true
27+
secure: true
28+
----

titles/customizing/master.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ include::modules/customizing/proc-customizing-the-backend-secret.adoc[leveloffse
2020
include::assemblies/assembly-configuring-templates.adoc[leveloffset=+1]
2121

2222

23-
include::modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths.adoc[leveloffset=+1]
23+
include::assemblies/assembly-customizing-learning-paths.adoc[leveloffset=+1]
2424

2525

2626
include::assemblies/assembly-configuring-a-floating-action-button.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)