generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 46
RHIDP-6499: Modularize Customizing the Learning Paths #1068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3b007f9
RHIDP-6499 Modularize modules/customizing-the-learning-paths/proc-cus…
themr0c e37e75e
Update assemblies/assembly-customizing-the-learning-paths.adoc
themr0c c8bc371
Update modules/customizing-the-learning-paths/proc-customizing-the-le…
themr0c f7a461a
Update assemblies/assembly-customizing-the-learning-paths.adoc
themr0c 5d683c2
Update modules/customizing-the-learning-paths/proc-customizing-the-le…
themr0c 57bb641
Update modules/customizing-the-learning-paths/proc-customizing-the-le…
themr0c e11c238
Update modules/customizing-the-learning-paths/proc-customizing-the-le…
themr0c 884b75b
Update modules/customizing-the-learning-paths/proc-customizing-the-le…
themr0c ff0bb75
Update modules/customizing-the-learning-paths/proc-customizing-the-le…
themr0c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[id='proc-customize-rhdh-learning-paths_{context}'] | ||
= Customizing the Learning Paths in {product} | ||
|
||
In {product}, you can configure Learning Paths by hosting the required data externally, | ||
and using the built-in proxy to deliver this data rather than the default. | ||
|
||
You can provide Learning Paths data from the following sources: | ||
|
||
* A JSON file hosted on a web server, such as GitHub or GitLab. | ||
* A dedicated service that provides the Learning Paths data in JSON format using an API. | ||
|
||
include::modules/customizing-the-learning-paths/proc-customizing-the-learning-paths-by-using-hosted-json-files.adoc[leveloffset=+1] | ||
|
||
|
||
include::modules/customizing-the-learning-paths/proc-customizing-the-learning-paths-by-using-a-dedicated-service.adoc[leveloffset=+1] |
82 changes: 0 additions & 82 deletions
82
modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths.adoc
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...ing-paths/proc-customizing-the-learning-paths-by-using-a-dedicated-service.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[id='proc-customizing-the-learning-paths-by-using-a-customization-service_{context}'] | ||
= Customizing the Learning Paths by using a customization service | ||
|
||
For advanced scenarios, you can host your {product} customization service to provide data to all configurable {product-short} pages. | ||
You can even use a different service for each page. | ||
|
||
.Procedure | ||
. Deploy your {product-short} customization service on the same {ocp-short} cluster as your {product-short} instance. | ||
You can find an example at link:https://github.com/redhat-developer/red-hat-developer-hub-customization-provider[`red-hat-developer-hub-customization-provider`], that provides the same data as default {product-short} data. | ||
The customization service provides a Learning Paths data URL such as: `pass:c[http://rhdh-customization-provider/learning-paths]`. | ||
themr0c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
. Configure the {product-short} proxy to use your dedicated service to provide the Learning Path data, add the following to the link:{configuring-book-url}[`{my-app-config-file}` file]: | ||
+ | ||
[source,yaml,subs='+quotes'] | ||
---- | ||
proxy: | ||
endpoints: | ||
'/developer-hub/learning-paths': | ||
target: _<learning_path_data_url>_ | ||
changeOrigin: true | ||
qsecure: true # <1> | ||
---- | ||
<1> Change to "false" in case of using self hosted cluster with a self-signed certificate |
44 changes: 44 additions & 0 deletions
44
...rning-paths/proc-customizing-the-learning-paths-by-using-hosted-json-files.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[id='proc-customizing-the-learning-paths-by-using-a-hosted-json-file_{context}'] | ||
= Customizing the Learning Paths by using a hosted JSON file | ||
|
||
For ease of use and simplicity, you can configure the Learning Paths by using a hosted JSON file. | ||
|
||
.Procedure | ||
. Publish the JSON file containing your Learning Paths data to a web server, such as GitHub or Gitlab. You can find an example at link:https://raw.githubusercontent.com/redhat-developer/rhdh/release-{product-version}/packages/app/public/learning-paths/data.json[]. | ||
|
||
. Configure the {product-short} proxy to access the Learning Paths data from the hosted JSON file, by adding the following code to the `{my-app-config-file}` file: | ||
themr0c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
[source,yaml] | ||
---- | ||
proxy: | ||
endpoints: | ||
'/developer-hub': | ||
target: https://raw.githubusercontent.com/ | ||
pathRewrite: | ||
'^/api/proxy/developer-hub/learning-paths': '/redhat-developer/rhdh/main/packages/app/public/learning-paths/data.json' | ||
changeOrigin: true | ||
secure: true | ||
---- | ||
+ | ||
[TIP] | ||
==== | ||
When also configuring the home page, due to the use of overlapping `pathRewrites` for both the `learning-path` and `homepage` quick access proxies, create the `learning-paths` configuration (`^api/proxy/developer-hub/learning-paths`) before you create the `homepage` configuration (`^/api/proxy/developer-hub`). | ||
For example: | ||
|
||
[source,yaml] | ||
---- | ||
proxy: | ||
endpoints: | ||
'/developer-hub': | ||
target: https://raw.githubusercontent.com/ | ||
pathRewrite: | ||
'^/api/proxy/developer-hub/learning-paths': '/redhat-developer/rhdh/main/packages/app/public/learning-paths/data.json' | ||
'^/api/proxy/developer-hub/tech-radar': '/redhat-developer/rhdh/main/packages/app/public/tech-radar/data-default.json' | ||
'^/api/proxy/developer-hub': '/redhat-developer/rhdh/main/packages/app/public/homepage/data.json' | ||
changeOrigin: true | ||
secure: true | ||
---- | ||
==== | ||
|
||
.Additional resources | ||
* xref:customizing-the-home-page[Customizing the Home page in {product}]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.