From a32f7b146c216f4159f65d5c0b9a7189d31b2f5a Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 13 Jan 2022 18:15:41 +0100 Subject: chore: add different feed formats (feed.xml, atom.xml, feed.json) --- src/utils/helpers/rss.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/utils') diff --git a/src/utils/helpers/rss.ts b/src/utils/helpers/rss.ts index 42560cb..3e7258a 100644 --- a/src/utils/helpers/rss.ts +++ b/src/utils/helpers/rss.ts @@ -2,7 +2,6 @@ import { config } from '@config/website'; import { getPublishedPosts } from '@services/graphql/queries'; import { ArticlePreview } from '@ts/types/articles'; import { Feed } from 'feed'; -import { writeFileSync } from 'fs'; const getAllPosts = async (): Promise => { const posts: ArticlePreview[] = []; @@ -50,5 +49,5 @@ export const generateFeed = async () => { }); }); - writeFileSync('./public/feed.xml', feed.rss2(), 'utf8'); + return feed; }; -- cgit v1.2.3