Compare commits

..

No commits in common. "21fb068901640da6b06bc746caa7002af07764a0" and "c8b5f726572aa2fd17070b01e72b5137ebbe45b4" have entirely different histories.

4 changed files with 8 additions and 33 deletions

View File

@ -1,12 +0,0 @@
import { Hono, Context } from 'hono';
import { Feed } from 'feed';
const feed = new Hono<{ Variables: { feed: Feed }}>();
export async function getFeedFile(c: Context) {
c.header('content-type', 'text/xml');
c.body("");
}
feed.get('/rss.xml', getFeedFile);
export default feed;

View File

@ -1,6 +1,3 @@
/**
* SiteMeta is often used for the `<meta />` tags in the document header
*/
export type SiteMeta = {
description?: string,
tags?: string[],

View File

@ -1,24 +1,10 @@
import TOML from 'smol-toml';
import { CONFIG_PATH } from '@blog/config';
export type SiteConfig = {
title: string;
owner: {
name: string;
email: string;
};
site: {
description: string;
url: string;
repo: string;
language: string;
copyright: string;
}
}
export async function getSiteConfig(): Promise<SiteConfig> {
export async function getSiteConfig() {
const siteConfig = CONFIG_PATH + '/site.toml';
const file = Bun.file(siteConfig);
const data = await file.text();
return TOML.parse(data) as SiteConfig;
return TOML.parse(data);
}

View File

@ -1,10 +1,14 @@
// generate the feed
//
import { Feed, FeedOptions } from 'feed';
import { getSiteConfig } from '@blog/services/config';
export async function feedFactory(): Feed {
}
export async function generateFeed(posts: PostService, feed: Feed): Feed {
const feed = new Feed({});
return feed;
}