Homepage Flashcards
(10 cards)
What is the benefit of having a good homepage?
1) improve the discoverability of the platform
2) prevent users from remembering direct URLs
3) surface relevant info quick
4) provide convenient shortcuts for common tasks
What plugin is used for composing a homepage?
Home plugin
What is the first page you see by default when you install Backstage?
software catalog
Command to install home plugin
yarn add –cwd packages/app @backstage/plugin-home
Steps to add a new home page?
1) Install the home plugin
2) Create a new HomePage component
3) Update router for the root / route
4) Update sidebar items
Create a new HomePage component
In packages/app/src/components/home/HomePage.tsx
import React from ‘react’;
export const HomePage = () => (
<h1>Welcome to Backstage!</h1>
);
Update router for the root / route
In packages/app/src/App.tsx
Remove: <Navigate></Navigate>
Add:
import { HomepageCompositionRoot } from ‘@backstage/plugin-home’;
import { HomePage } from ‘./components/home/HomePage’;
<Route path=”/” element={<HomepageCompositionRoot></HomepageCompositionRoot>}>
<HomePage></HomePage>
</Route>
Update sidebar items in home page creation process
In packages/app/src/components/Root/Root.tsx
Remove: HomeIcon from SidebarPage/Sidebar.
Add:
import CategoryIcon from ‘@material-ui/icons/Category’;
<SidebarItem icon={HomeIcon} to=”/” text=”Home” />
<SidebarItem icon={CategoryIcon} to=”catalog” text=”Catalog” />
command to bump all @backstage packages and dependencies you’re using to the latest versions
yarn backstage-cli versions:bump
How often is the main release line released?
monthly