0.1.1 • Published 8 months ago

@rikclaessens/backstage-plugin-news v0.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

backstage-plugin-news

To install the plugin in the Backstage app, run the following commands:

yarn --cwd packages/app add @rikclaessens/backstage-plugin-news

Then, make the plugin available in your Backstage instance by adding it to the App.tsx:

...
import { NewsItemsPage } from '@rikclaessens/backstage-plugin-news';
...

const routes = (
  <FlatRoutes>
    ...
    <Route path="/news" element={<NewsItemsPage />} />
    ...
  </FlatRoutes>
);
...

When searching for news, Backstage provides a default search result item. The plugin provides a result item that shows more information to the user. To use this result item, add the following code to the SearchPage.tsx:

import { NewsSearchResultListItem } from '@rikclaessens/backstage-plugin-news';
...

<SearchResult>
  ...
  <NewsSearchResultListItem icon={<Bullhorn />} />
</SearchResult>
...