第11章 Home ページのカスタマイズ
app-config を使用する場合は、次のことができます。
- インストールして有効にしたプラグインに基づいて表示される追加のカードを使用して、デフォルトの Home ページレイアウトをカスタマイズおよび拡張します。
- クイックアクセスリンクを変更します。
次の利用可能なカードを追加、再編成、および削除します。
- 検索バー
- クイックアクセス
- 見出し
- マークダウン
- プレースホルダー
- スター付きエンティティーのカタログ化
- 注目のドキュメント
11.1. Home ページカードのカスタマイズ リンクのコピーリンクがクリップボードにコピーされました!
管理者は、12 列のグリッドにあるカードの固定の高さを変更できます。
デフォルトの Home ページは、次の app-config.yaml ファイル設定のとおりです。
dynamicPlugins:
frontend:
red-hat-developer-hub.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 の Home ページにさまざまなカードを設定します。
- 検索
dynamicPlugins: frontend: red-hat-developer-hub.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 表11.1 利用可能なプロパティー プロパティー デフォルト 説明 path/search必要に応じて、リンクされた検索パスをオーバーライドします。
queryParamquery必要に応じて、検索クエリーパラメーター名をオーバーライドします。
- クイックアクセス
dynamicPlugins: frontend: red-hat-developer-hub.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 表11.2 利用可能なプロパティー プロパティー デフォルト 説明 titleQuick Access必要に応じて、リンクされた検索パスをオーバーライドします。
pathnone
必要に応じて、検索クエリーパラメーター名をオーバーライドします。
- 見出し
dynamicPlugins: frontend: red-hat-developer-hub.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 表11.3 利用可能なプロパティー プロパティー デフォルト 説明 titlenone
タイトル
- マークダウン
dynamicPlugins: frontend: red-hat-developer-hub.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/) * [Janus Plugins](https://github.com/janus-idp/backstage-plugins) * [Backstage Community Plugins](https://github.com/backstage/community-plugins) * [RHDH Plugins](https://github.com/redhat-developer/rhdh-plugins) * [RHDH Showcase](https://github.com/redhat-developer/rhdh) - 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/) * [Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/) * [Janus Plugins](https://github.com/janus-idp/backstage-plugins) * [Backstage Community Plugins](https://github.com/backstage/community-plugins) * [RHDH Plugins](https://github.com/redhat-developer/rhdh-plugins) * [RHDH Showcase](https://github.com/redhat-developer/rhdh)- プレースホルダー
dynamicPlugins: frontend: red-hat-developer-hub.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: red-hat-developer-hub.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: CatalogStarredEntitiesCard- 注目のドキュメント
dynamicPlugins: frontend: red-hat-developer-hub.backstage-plugin-dynamic-home-page: mountPoints: - mountPoint: home.page/cards importName: FeaturedDocsCard