@kozmoai/backstage-plugin-home-rss
v1.3.11
Published
A react component that renders a RSS feed as a homepage component. You can configure the plugin to point to a remote RSS feed and it will fetch that RSS feed and render it inside a card componenet.
Downloads
4
Readme
RSS Home page plugin
A react component that renders a RSS feed as a homepage component. You can configure the plugin to point to a remote RSS feed and it will fetch that RSS feed and render it inside a card componenet.
Setup
If you didn't set up the HomePage plugin you can see the official documentation about it here. You'll need to have it setup to be able to include this plugin.
Add the following componenet to your HomePage.tsx file. The HomePageRSS
props are the following type.
yarn add @kozmoai/backstage-plugin-home-rss
export type RSSContentProps = {
feedURL: string;
};
You will need to setup a proxy in order to bypass the CORs checks in the browser:
proxy:
'/reuters-news-feed':
target: 'https://www.reutersagency.com/feed'
Then you can add a card component to your Home Page.
// packages/app/src/components/home/HomePage.tsx
import { HomePageRSS } from '@kozmoai/backstage-plugin-home-rss';
export const HomePage = () => {
return (
...
<Grid item xs={12} md={6}>
<HomePageRSS
feedURL="http://localhost:7007/api/proxy/reuters-news-feed/?best-topics=tech&post_type=best"
title="Reuters News"
paging={false} // Optional. By default the paging is enabled, but it can be disabled
/>
</Grid>
...
);
};
Customization
It's also possible to customize each row in the RSS Feed table. You have to use the property rowRenderer
. Check the default renderer as an example.