diff --git a/src/handlers/feed.ts b/src/handlers/feed.ts index aaa9295..807725c 100644 --- a/src/handlers/feed.ts +++ b/src/handlers/feed.ts @@ -1,11 +1,21 @@ import { Hono, Context } from 'hono'; import { Feed } from 'feed'; -const feed = new Hono<{ Variables: { feed: Feed }}>(); +const feed = new Hono(); +let feedBuffer: string = ""; export async function getFeedFile(c: Context) { - c.header('content-type', 'text/xml'); - c.body(""); + c.header('Content-Type', 'text/xml'); + + if (!feedBuffer) { + // get the post meta + // get the site meta + // create the feed + // get the feed data + feedBuffer = ""; + } + + c.body(feedBuffer); } feed.get('/rss.xml', getFeedFile);