4장. TechDocs add-ons


TechDocs add-ons are dynamic plugins that extend the functionality of the built-in TechDocs plugin. For example, you can use add-ons to report documentation issues, change text size, or view images in overlay in either the TechDocs Reader page or an Entity page.

The following table describes the TechDocs add-ons that are available for Red Hat Developer Hub 1.7:

Expand
표 4.1. TechDocs Add-ons available in Red Hat Developer Hub
TechDocs Add-onPackage/PluginDescriptionType

<ReportIssue />

backstage-plugin-techdocs-module-addons-contrib

Select a portion of text on a TechDocs page and open an issue against the repository that contains the documentation. The issue template is automatically populated with the selected text.

Preinstalled

<TextSize />

backstage-plugin-techdocs-module-addons-contrib

Customize text size on documentation pages by increasing or decreasing the font size with a slider or buttons. The default value for font size is 100% and this setting is kept in the browser’s local storage whenever it is changed.

External

<LightBox />

backstage-plugin-techdocs-module-addons-contrib

Open images in a light-box on documentation pages, to navigate to multiple images on a single page. The image size of the light-box image is the same as the image size on the document page. Clicking the zoom icon increases the image size to fit the screen.

External

The backstage-plugin-techdocs-module-addons-contrib plugin package exports both preinstalled and external add-ons supported by Red Hat to the TechDocs plugin. This plugin package is preinstalled on Red Hat Developer Hub and is enabled by default. If the plugin package is disabled, all of the TechDocs add-ons exported by the package as also disabled.

4.1. Installing and configuring a TechDocs add-on

TechDocs add-ons supported by Red Hat are exported to the TechDocs plugin by the`backstage-plugin-techdocs-module-addons-contrib` plugin package, which is preinstalled on Red Hat Developer Hub and enabled by default. The <ReportIssue /> add-on is part of the default configuration of this plugin package and comes ready to use in the TechDocs plugin.

You can install other supported TechDocs add-ons by configuring the`backstage-plugin-techdocs-module-addons-contrib` plugin package in the Red Hat Developer Hub ConfigMap or Helm chart, depending on whether you use the Operator or Helm chart for installation. If you want to customize your TechDocs experience beyond the functions of the supported add-ons, you can install third-party add-ons on your TechDocs plugin, including add-ons that you create yourself.

4.1.1. Installing and configuring an external TechDocs add-on using the Operator

You can use a dynamic plugin to import TechDocs add-ons into your TechDocs plugin. If you use the Red Hat Developer Hub Operator to install the dynamic plugin, you can add TechDocs add-ons to the plugin package in your ConfigMap.

Preinstalled add-ons, such as ReportIssue, are included in the default backstage-plugin-techdocs-module-addons-contrib package configuration. External add-ons that are supported by Red Hat are installed by manually adding them to the techdocsAddons section of the configuration file.

Procedure

  1. From the Developer perspective in the OpenShift Container Platform web console, click ConfigMaps > Create ConfigMap.
  2. From the Create ConfigMap page, select the YAML view option in the Configure via field.
  3. In the newly created ConfigMap, add the default backstage-plugin-techdocs-module-addons-contrib package configuration. For example:

    kind: ConfigMap
    apiVersion: v1
    metadata:
      name: dynamic-plugins-rhdh
    data:
      dynamic-plugins.yaml: |
        includes:
          - dynamic-plugins.default.yaml
        plugins:
          - package: ./dynamic-plugins/dist/backstage-plugin-techdocs-module-addons-contrib
            disabled: false
            pluginConfig:
              dynamicPlugins:
                frontend:
                  backstage.plugin-techdocs-module-addons-contrib:
                    techdocsAddons:
                      - importName: ReportIssue
  4. In the techdocsAddons section of the ConfigMap, add importName: <external_techdocs_add-on> for each external TechDocs add-on that you want to add from the specified plugin package. For example:

    kind: ConfigMap
    apiVersion: v1
    metadata:
      name: dynamic-plugins-rhdh
    data:
      dynamic-plugins.yaml: |
        includes:
          - dynamic-plugins.default.yaml
        plugins:
          - package: ./dynamic-plugins/dist/backstage-plugin-techdocs-module-addons-contrib
            disabled: false
            pluginConfig:
              dynamicPlugins:
                frontend:
                  backstage.plugin-techdocs-module-addons-contrib:
                    techdocsAddons:
                      - importName: ReportIssue
                      - importName: <external_techdocs_add-on>

    where:

    <external_techdocs_add-on>
    Specifies the external TechDocs add-on that you want to install, for example, TextSize or LightBox.
  5. Click Create.
  6. In the web console navigation menu, click Topology.
  7. Click on the overflow menu for the Red Hat Developer Hub instance that you want to use and select Edit Backstage to load the YAML view of the Red Hat Developer Hub instance.
  8. In your Backstage CR, add the dynamicPluginsConfigMapName: <dynamic_plugins_configmap> key-value pair. For example:

    apiVersion: rhdh.redhat.com/v1alpha3
    kind: Backstage
    metadata:
      name: my-rhdh
    spec:
      application:
    # ...
        dynamicPluginsConfigMapName: _<dynamic_plugins_configmap>_
    # ...

    where:

    <dynamic_plugins_configmap>
    Specifies the name of your dynamic plugins ConfigMap for your Red Hat Developer Hub instance, for example, dynamic-plugins-rhdh.
  9. Click Save.
  10. In the web console navigation menu, click Topology and wait for the Red Hat Developer Hub pod to start.
  11. Click the Open URL icon to start using the Red Hat Developer Hub platform with the new configuration changes.

4.1.2. Installing and configuring an external TechDocs add-on using the Helm chart

You can use a dynamic plugin to import TechDocs add-ons into your TechDocs plugin. If you use the Red Hat Developer Hub Helm chart to install the dynamic plugin, you can add TechDocs add-ons to the plugin package in your Helm chart.

Preinstalled add-ons, such as ReportIssue, are included in the default backstage-plugin-techdocs-module-addons-contrib package configuration. External add-ons that are supported by Red Hat are installed by manually adding them to the techdocsAddons section of the configuration file.

Prerequisites

  • The TechDocs plugin is installed and enabled.

Procedure

  1. In your Helm chart, add the global.dynamic parameters required to install a dynamic plugin, as shown in Installing dynamic plugins using the Helm chart

    참고

    The default configuration includes the dynamic-plugins.default.yaml file, which contains all of the dynamic plugins, including TechDocs add-ons, that are preinstalled in Red Hat Developer Hub, whether they are enabled or disabled by default.

  2. In your Helm chart, add the default backstage-plugin-techdocs-module-addons-contrib package configuration. For example:

    global:
      dynamic:
        plugins:
          - package: ./dynamic-plugins/dist/backstage-plugin-techdocs-module-addons-contrib
            disabled: false
            pluginConfig:
              dynamicPlugins:
                frontend:
                  backstage.plugin-techdocs-module-addons-contrib:
                    techdocsAddons:
                      - importName: ReportIssue
  3. In the techdocsAddons section of the Helm chart, add importName: <external_techdocs_add-on> for each external TechDocs add-on that you want to add from the specified plugin package. For example:

    global:
      dynamic:
        plugins:
          - package: ./dynamic-plugins/dist/backstage-plugin-techdocs-module-addons-contrib
            disabled: false
            pluginConfig:
              dynamicPlugins:
                frontend:
                  backstage.plugin-techdocs-module-addons-contrib:
                    techdocsAddons:
                      - importName: ReportIssue
                      - importName: <external_techdocs_add-on>

    where:

    <external_techdocs_add-on>
    Specifies the external TechDocs add-on that you want to install, for example, TextSize or LightBox.

4.1.3. Installing and configuring a third-party TechDocs add-on

You can install compatible third-party TechDocs add-on on your Red Hat Developer Hub instance as a front-end dynamic plugin.

Prerequisites

  • The third-party TechDocs add-on has a valid package.json file in its root directory, containing all required metadata and dependencies.
  • The third-party plugin is packaged as a dynamic plugin in an OCI image. For alternative package types, see Installing third-party plugins in Red Hat Developer Hub.
  • You have installed the yarn package manager.
  • The third-party plugin is packaged as a dynamic plugin in an OCI image.* You have installed and configured Node.js and NPM.

Procedure

  1. Install the third-party plugin that you want to use to import your third-party add-on by entering the following command:

    yarn install
  2. Obtain the source code for the third-party TechDocs add-on that you want to use.
  3. Export the TechDocs add-on as a dynamic plugin using the following command:

    npx @red-hat-developer-hub/cli@latest plugin export
    참고

    The @latest tag pulls the latest version of the @red-hat-developer-hub/cli package, which is compatible with the most recent features and fixes. Use a version that is compatible with your Red Hat Developer Hub version.

  4. To package the third-party TechDocs add-on as a dynamic plugin, navigate to the root directory where the plugin is stored (not the dist-dynamic directory) and run the npx command with the --tag option to specify the image name and tag. For example:

    npx @red-hat-developer-hub/cli@latest plugin package --tag quay.io/<user_name>/<techdocs_add-on_image>:latest
    참고

    The output of the package-dynamic-plugins command provides the file path to the plugin for use in the dynamic-plugin-config.yaml file.

  5. To publish the third-party TechDocs add-on to a Quay repository, push the image to a registry using one of the following commands, depending on your virtualization tool:

    • To use podman, enter the following command:

      podman push quay.io/<user_name>/<techdocs_add-on_image>:latest
    • To use docker, enter the following command:

      docker push quay.io/<user_name>/<techdocs_add-on_image>:latest
  6. Open your dynamic-plugins.yaml file to view or modify the configuration for the third-party TechDocs add-on. For example:

    plugins:
          - package: oci://quay.io/<user_name>/<techdocs_add-on_image>:latest!<techdocs_add-on_package>
            disabled: false
            pluginConfig:
              dynamicPlugins:
                frontend:
                 <techdocs_add-on_package>
                    techdocsAddons:
                      - importName: <third-party_add-on_name>
                       config:
                          props:
                           <techdocs_add-on_property_key>: <techdocs_add-on_property_value>

    where

    <user_name>
    Specifies your Quay user name or organization name.
    <techdocs_add-on_image>
    Specifies the name of the image for the third-party add-on that you want to use, for example, mermaid.
    <techdocs_add-on_package>
    Specifies the , for example, backstage-plugin-techdocs-addon-mermaid.
    <third-party_add-on_name>
    Specifies the name of the third-party add-on that you want to use, for example, Mermaid.
    <techdocs_add-on_property_key>
    Specifies the name of the custom property that can be passed to the third-party add-on, for example, themeVariables. Properties are specific to each add-on. You can list multiple properties for an add-on.
    <techdocs_add-on_property_value>
    Specifies the value of a property key for the third-party add-on, for example, lineColor: #000000.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동