Chapter 11. Customizing the Home page
When using your RHDH app-config.yaml file, you can do any of the following tasks:
- Customize and extend the default Home page layout with additional cards that appear based on the plugins you have installed and enabled.
- Change quick access links.
- Add, reorganize, and remove the available homepage cards.
11.1. Available homepage cards Copy linkLink copied to clipboard!
As an administrative user, you can easily integrate custom features or content from any installed plugin into your Home page layout. You can use the additional cards available for configuration based on the frontend plugins you enable.
The following is a list of the available homepage cards:
- Search bar
- Quick access
- Headline
- Markdown
- Placeholder
- Catalog starred entities
Featured docs
NoteEach card can have a
layoutsdefinition andpropsthat depend on the component you use.
11.2. Customizing the Home page cards Copy linkLink copied to clipboard!
As an administrator, you can customize the layout and content of the Home page to create a tailored user experience. This includes integrating various specialized cards into the primary view.
The Home page layout uses a 12-column grid system. You can precisely define the position (x), width (w), and height (h) for each card across multiple screen breakpoints:
- Extra-large (xl)
- Large (lg)
- Medium (md)
- Small (sm)
- Extra-small (xs)
- Extra-extra-small (xxs)
The default Home page is as shown in the following app-config.yaml file configuration:
Prerequisites
-
You have administrative access and can modify the
app-config.yamlfile for dynamic plugin configurations.
Procedure
Configure different cards for your Home page in Red Hat Developer Hub as shown in the following code:
- Search
You can use the SearchBar card to provide essential search functionality directly on the Home page.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Table 11.1. Available props Prop Default Description path/searchOverride the linked search path if needed
queryParamqueryOverride the search query parameter name if needed
- Quick access
You can use the QuickAccessCard card to function as a customizable shortcut panel.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Table 11.2. Available props Prop Default Description titleQuick AccessOverride the linked search path if needed
pathnone
Override the search query parameter name if needed
- Headline
You can use the Headline card to display important information.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Table 11.3. Available props Prop Default Description titlenone
Title
- Markdown
You can use the Markdown card to display richly formatted content directly within the Home page layout. This card uses Markdown syntax to present structured information, such as lists and links (documentation and plugin repositories).
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Placeholder
You can use the Placeholder card as a utility element for reserving space or for layout testing on the Home page.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Catalog starred entities
You can use the CatalogStarredEntitiesCard card to provide a dedicated space on the Home page for users to view catalog entities that they have marked as starred.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Featured docs
You can use the FeaturedDocsCard card as a way to highlight specific documentation within Red Hat Developer Hub, as it is available for deployment on the Home page.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - EntitySection
You can use the EntitySection card to create a visually engaging section that highlights catalog entities of various kinds, such as
Component,API,Resource, andSystem.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - OnboardingSection
You can use the OnboardingSection card to quickly discover learning resources within RHDH.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - TemplateSection
You can use the TemplateSection card to quickly explore and initiate software templates in RHDH.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
11.3. Defining the layout of the Red Hat Developer Hub Home page Copy linkLink copied to clipboard!
The Home page uses a 12-column grid to position your cards. You can use the optimal parameters to define the layout of your Developer Hub Home page.
Prerequisites
Include the following optimal parameters in each of your breakpoints:
- width (w)
- height (h)
- position (x and y)
Procedure
Configure your Developer Hub
app-config.yamlconfiguration file by choosing one of the following options:- Use the full space on smaller windows and half of the space on larger windows as follows:
-
Show the cards side by side by defining the
xparameter as shown in the following example:
However, you can see a second card below this card by default.
-
Show the cards in three columns by defining the
xparameter as shown in the following example:
11.4. Customizing your dynamic homepage to optimize your workflow Copy linkLink copied to clipboard!
You can customize your homepage to suit your preferences using the drag-and-drop, resizing, and widget management functionality.
You can do the following actions with the customizable homepage:
- Drag and drop: Move cards around the layout
- Resize: Adjust card dimensions
- Add widget: Select from available cards to add to the homepage
- Remove cards: Delete cards from the homepage
- Restore defaults: Reset to the original card configuration
- User persistence: Settings are saved depending on how you use Backstage Storage API
Additional cards automatically appear based on the installed and enabled plugins. The plugins provide the following two main components:
-
DynamicHomePage: The read-only homepage that displays configured cards without your customization. -
DynamicCustomizableHomePage: The interactive homepage that allows users to move, resize, and manage cards.
The default homepage displays the OnboardingSection, the EntitySection, and the TemplateSection cards by default. These cards define the default width (w) and height (h) for the cards at various responsiveness levels.
The homepage automatically loads the following configuration:
Procedure
You can arrange the cards and adjust their dimensions using the drag-and-drop and resize functionality. The following is an example of an interactive homepage where you can add, remove, move, and resize cards:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can change the title by overriding the
titleproperty of the dynamic homepage plugin as shown in the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
titleproperty supports two variables:-
{{displayName}}: This contains the fulldisplayNameof the catalog entity. -
{{firstName}}: This contains the first part (separated by a space) of thedisplayName. You can use a
subtitleproperty which is not used by default as shown in the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
11.5. Customizing QuickAccessCard card icons on the Red Hat Developer Hub homepage Copy linkLink copied to clipboard!
As an administrator, you can customize the QuickAccessCard card icons on the Red Hat Developer Hub homepage to enhance its visual appeal and user experience. You can integrate custom branding or standard icons by leveraging a remote JSON configuration file.
Procedure
- Add the JSON Data source. The QuickAccessCard card on the homepage supports loading data from a JSON file. This JSON file can be hosted in your GitHub repository or any accessible endpoint.
Configure the Proxy in your RHDH
app-config.yamlfile.To allow the homepage to fetch data from the hosted JSON file, add the following proxy configuration to your RHDH
app-config.yamlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The following table lists the supported icon types:
| Icon type | Example | Rendered as |
|---|---|---|
| Backstage system icon |
| Uses Backstage system [icons](https://github.com/backstage/backstage/blob/master/packages/app-defaults/src/defaults/icons.tsx) |
| SVG String |
| Renders inline SVG |
| Image URL |
|
Renders external image. External images might be restricted to Content Security Policy (CSP) which can be configured in your RHDH |
| Relative Path |
| Loads the icon from the app public folder (if present) |
SVGs must be valid strings when stored inside JSON (use single quotes inside <svg>).
The following is an example of a JSON file: