第3章 Red Hat Developer Hub の Home ページのカスタマイズ
app-config を使用する場合は、次のことができます。
- インストールして有効にしたプラグインに基づいて表示される追加のカードを使用して、デフォルトのホームページレイアウトをカスタマイズおよび拡張します。
- クイックアクセスリンクを変更します。
次の利用可能なカードを追加、再編成、および削除します。
- 検索バー
- クイックアクセス
- 見出し
- マークダウン
- プレースホルダー
- スター付きエンティティーのカタログ化
- 注目のドキュメント
3.1. ホームページカードのカスタマイズ リンクのコピーリンクがクリップボードにコピーされました!
管理者は、12 列のグリッドにあるカードの固定の高さを変更できます。
デフォルトのホームページは、次の app-config ファイル設定のとおりです。
dynamicPlugins:
frontend:
janus-idp.backstage-plugin-dynamic-home-page:
dynamicRoutes:
- path: /
importName: DynamicHomePage
mountPoints:
- mountPoint: home.page/cards
importName: SearchBar
config:
layouts:
xl: { w: 10, h: 1, x: 1 }
lg: { w: 10, h: 1, x: 1 }
md: { w: 10, h: 1, x: 1 }
sm: { w: 10, h: 1, x: 1 }
xs: { w: 12, h: 1 }
xxs: { w: 12, h: 1 }
- mountPoint: home.page/cards
importName: QuickAccessCard
config:
layouts:
xl: { w: 7, h: 8 }
lg: { w: 7, h: 8 }
md: { w: 7, h: 8 }
sm: { w: 12, h: 8 }
xs: { w: 12, h: 8 }
xxs: { w: 12, h: 8 }
- mountPoint: home.page/cards
importName: CatalogStarredEntitiesCard
config:
layouts:
xl: { w: 5, h: 4, x: 7 }
lg: { w: 5, h: 4, x: 7 }
md: { w: 5, h: 4, x: 7 }
sm: { w: 12, h: 4 }
xs: { w: 12, h: 4 }
xxs: { w: 12, h: 4 }
前提条件
-
管理者アクセス権があり、動的プラグイン設定の
app-config.yamlファイルを変更できる。
手順
次のように、Red Hat Developer Hub のホームページにさまざまなカードを設定します。
- 検索
dynamicPlugins: frontend: janus-idp.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: SearchBar config: layouts: xl: { w: 10, h: 1, x: 1 } lg: { w: 10, h: 1, x: 1 } md: { w: 10, h: 1, x: 1 } sm: { w: 10, h: 1, x: 1 } xs: { w: 12, h: 1 } xxs: { w: 12, h: 1 }Expand 表3.1 利用可能なプロパティー プロパティー デフォルト 説明 path/search必要に応じてリンクされた検索パスを上書きする
queryParamquery必要に応じて検索クエリーパラメーター名を上書きする
- クイックアクセス
dynamicPlugins: frontend: janus-idp.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: QuickAccessCard config: layouts: xl: { h: 8 } lg: { h: 8 } md: { h: 8 } sm: { h: 8 } xs: { h: 8 } xxs: { h: 8 }Expand 表3.2 利用可能なプロパティー プロパティー デフォルト 説明 titleQuick Access必要に応じてリンクされた検索パスを上書きする
pathnone
必要に応じて検索クエリーパラメーター名を上書きする
- 見出し
dynamicPlugins: frontend: janus-idp.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: Headline config: layouts: xl: { h: 1 } lg: { h: 1 } md: { h: 1 } sm: { h: 1 } xs: { h: 1 } xxs: { h: 1 } props: title: Important infoExpand 表3.3 利用可能なプロパティー プロパティー デフォルト 説明 titlenone
タイトル
- マークダウン
dynamicPlugins: frontend: janus-idp.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: MarkdownCard config: layouts: xl: { w: 6, h: 4 } lg: { w: 6, h: 4 } md: { w: 6, h: 4 } sm: { w: 6, h: 4 } xs: { w: 6, h: 4 } xxs: { w: 6, h: 4 } props: title: Company links content: | ### RHDH * [Website](https://developers.redhat.com/rhdh/overview) * [Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/) * [GitHub Showcase](https://github.com/redhat-developer/rhdh) * [GitHub Plugins](https://github.com/janus-idp/backstage-plugins) - mountPoint: home.page/cards importName: Markdown config: layouts: xl: { w: 6, h: 4, x: 6 } lg: { w: 6, h: 4, x: 6 } md: { w: 6, h: 4, x: 6 } sm: { w: 6, h: 4, x: 6 } xs: { w: 6, h: 4, x: 6 } xxs: { w: 6, h: 4, x: 6 } props: title: Important company links content: | ### RHDH * [Website](https://developers.redhat.com/rhdh/overview) * [Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/) * [GitHub Showcase](https://github.com/redhat-developer/rhdh) * [GitHub Plugins](https://github.com/janus-idp/backstage-plugins)- プレースホルダー
dynamicPlugins: frontend: janus-idp.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: Placeholder config: layouts: xl: { w: 1, h: 1 } lg: { w: 1, h: 1 } md: { w: 1, h: 1 } sm: { w: 1, h: 1 } xs: { w: 1, h: 1 } xxs: { w: 1, h: 1 } props: showBorder: true debugContent: '1'- スター付きエンティティーのカタログ化
dynamicPlugins: frontend: janus-idp.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: CatalogStarredEntitiesCard- 注目のドキュメント
dynamicPlugins: frontend: janus-idp.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: FeaturedDocsCard