For ease of use and simplicity, you can configure the Learning Paths by using a hosted JSON file.
-
Publish the JSON file containing your Learning Paths data to a web server, such as GitHub or Gitlab. You can find an example at 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 to the
{my-app-config-file}
file: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
TipWhen also configuring the home page, due to the use of overlapping
pathRewrites
for both thelearning-path
andhomepage
quick access proxies, create thelearning-paths
configuration (^api/proxy/developer-hub/learning-paths
) before you create thehomepage
configuration (^/api/proxy/developer-hub
). For example: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