diff --git a/assemblies/assembly-customizing-learning-paths.adoc b/assemblies/assembly-customizing-learning-paths.adoc new file mode 100644 index 0000000000..56ca1fb336 --- /dev/null +++ b/assemblies/assembly-customizing-learning-paths.adoc @@ -0,0 +1,22 @@ +:_mod-docs-content-type: ASSEMBLY +:context: customizing-learning-paths +[id="{context}"] += Customizing the Learning Paths in {product} + +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. + +[NOTE] +==== +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 {product}, see xref:customizing-the-home-page[Customizing the Home page in {product}]. +==== + +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. + +include::modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-json-files.adoc[] + +include::modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-dedicated-service.adoc[] diff --git a/modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths.adoc b/modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-dedicated-service.adoc similarity index 51% rename from modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths.adoc rename to modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-dedicated-service.adoc index 2ae0faf956..e14da7d4f7 100644 --- a/modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths.adoc +++ b/modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-dedicated-service.adoc @@ -1,46 +1,4 @@ -[id='proc-customize-rhdh-learning-paths_{context}'] -= Customizing the Learning Paths in {product} - -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. - -[NOTE] -==== -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 {product}, see xref:customizing-the-home-page[Customizing the Home page in {product}]. -==== - -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. - -== Using hosted JSON files to provide data to the Learning Paths - -.Prerequisites - -You have installed {product} by using either the Operator or Helm chart. -For more information, see xref:{installing-on-ocp-book-url}#assembly-install-rhdh-ocp[{installing-on-ocp-book-title}]. - -.Procedure - -To access the data from the JSON files, complete the following step: - -* Add the following code to the `{my-app-config-file}` file: -+ -[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 ----- +[id='proc-customize-rhdh-learning-paths-dedicated-service_{context}'] == Using a dedicated service to provide data to the Learning Paths diff --git a/modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-json-files.adoc b/modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-json-files.adoc new file mode 100644 index 0000000000..b8a4bfad23 --- /dev/null +++ b/modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths-json-files.adoc @@ -0,0 +1,28 @@ +[id='proc-customize-rhdh-learning-paths-json-files_{context}'] + +== Using hosted JSON files to provide data to the Learning Paths + +.Prerequisites + +You have installed {product} by using either the Operator or Helm chart. +For more information, see xref:{installing-on-ocp-book-url}#assembly-install-rhdh-ocp[{installing-on-ocp-book-title}]. + +.Procedure + +To access the data from the JSON files, complete the following step: + +* Add the following code to the `{my-app-config-file}` file: ++ +[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 +---- diff --git a/titles/customizing/master.adoc b/titles/customizing/master.adoc index 3b54976696..8f06261666 100644 --- a/titles/customizing/master.adoc +++ b/titles/customizing/master.adoc @@ -20,7 +20,7 @@ include::modules/customizing/proc-customizing-the-backend-secret.adoc[leveloffse include::assemblies/assembly-configuring-templates.adoc[leveloffset=+1] -include::modules/customizing-the-learning-paths/proc-customize-rhdh-learning-paths.adoc[leveloffset=+1] +include::assemblies/assembly-customizing-learning-paths.adoc[leveloffset=+1] include::assemblies/assembly-configuring-the-global-header.adoc[leveloffset=+1]