This documentation is for a release that is no longer maintained
See documentation for the latest supported version.Chapter 5. Customizing the Learning Paths in Red Hat Developer Hub
In Red Hat Developer Hub, you can configure Learning Paths by passing the data into the app-config.yaml file as a proxy. The base URL must include the /developer-hub/learning-paths proxy.
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).
For more information about customizing the Home page in Red Hat Developer Hub, see Customizing the Home page in Red Hat Developer Hub.
You can provide data to the Learning Path from the following sources:
- JSON files hosted on GitHub or GitLab.
- A dedicated service that provides the Learning Path data in JSON format using an API.
5.1. Using hosted JSON files to provide data to the Learning Paths Copy linkLink copied to clipboard!
Prerequisites
You have installed Red Hat Developer Hub by using either the Operator or Helm chart. For more information, see Installing Red Hat Developer Hub on OpenShift Container Platform.
Procedure
To access the data from the JSON files, complete the following step:
Add the following code to the
app-config.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Using a dedicated service to provide data to the Learning Paths Copy linkLink copied to clipboard!
When using a dedicated service, you can do the following:
- Use the same service to provide the data to all configurable Developer Hub pages or use a different service for each page.
-
Use the
red-hat-developer-hub-customization-provideras an example service, which provides data for both the Home and Tech Radar pages. Thered-hat-developer-hub-customization-providerservice provides the same data as default Developer Hub data. You can fork thered-hat-developer-hub-customization-providerservice repository from GitHub and modify it with your own data, if required. -
Deploy the
red-hat-developer-hub-customization-providerservice and the Developer Hub Helm chart on the same cluster.
Prerequisites
- You have installed the Red Hat Developer Hub using Helm chart. For more information, see Installing Red Hat Developer Hub on OpenShift Container Platform.
Procedure
To use a dedicated service to provide the Learning Path data, complete the following steps:
Add the following code to the
app-config.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow where the
LEARNING_PATH_DATA_URLis defined ashttp://<SERVICE_NAME>/learning-paths, for example,http://rhdh-customization-provider/learning-paths.NoteYou can define the
LEARNING_PATH_DATA_URLby adding it torhdh-secretsor by directly replacing it with its value in your custom ConfigMap.- Delete the Developer Hub pod to ensure that the new configurations are loaded correctly.