diff --git a/src/resources/feed-info-list.ts b/src/resources/feed-info-list.ts index 0b332ae93121..c3691d78c20e 100644 --- a/src/resources/feed-info-list.ts +++ b/src/resources/feed-info-list.ts @@ -21,37 +21,12 @@ const createFeedInfoList = (feedInfoTuples: FeedInfoTuple[]) => { }; export const fetchFeedInfoList = async (): Promise => { - interface FeedItem { - url: string; - feeds: ValidUrl[]; - } - // RSSの一覧を取得 - const response = await fetch('https://jser.info/watch-list/data/opml-list.json'); - const feedInfoList: FeedItem[] = await response.json(); - // 特定のドメインは除外する - const ExcludedDomains = [ - // beta的なリリースが埋まりやすいため - 'github.com', - // https://github.com/jser/watch-list-rss/issues/1 - 'www.aha.io', - ]; - // フィードの重複を取り除く - const tmpUsedDomainSet = new Set(); - const feedInfoListWithoutDomains = feedInfoList.filter((feedItem) => { - const feedUrl = feedItem.feeds[0]; - if (!feedUrl) { - return false; + return [ + { + label: 'https://www.aha.io/blog/feed.xml', + url: 'https://www.aha.io/blog/feed.xml', } - const feedHostname = new URL(feedItem.feeds[0]).hostname; - if (tmpUsedDomainSet.has(feedHostname) || tmpUsedDomainSet.has(feedUrl)) { - return false; - } - tmpUsedDomainSet.add(feedHostname); - tmpUsedDomainSet.add(feedUrl); - // remove duplicate domain - return !ExcludedDomains.includes(feedHostname); - }); - return createFeedInfoList(feedInfoListWithoutDomains.map((feedItem) => [feedItem.url, feedItem.feeds[0]])); + ]; }; /**