aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-13 18:15:41 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-13 18:25:34 +0100
commita32f7b146c216f4159f65d5c0b9a7189d31b2f5a (patch)
tree29021a84321158e779a404060878e57055b74b84 /src/utils
parent65a4cb6ce9387c52c4274fddde9320baadbf017f (diff)
chore: add different feed formats (feed.xml, atom.xml, feed.json)
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/helpers/rss.ts3
1 files changed, 1 insertions, 2 deletions
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<ArticlePreview[]> => {
const posts: ArticlePreview[] = [];
@@ -50,5 +49,5 @@ export const generateFeed = async () => {
});
});
- writeFileSync('./public/feed.xml', feed.rss2(), 'utf8');
+ return feed;
};