Add RSS feed to footer and page. Fix #8

This commit is contained in:
2023-04-05 16:57:25 +02:00
parent d723d4264a
commit 4d689a86ab
7 changed files with 17 additions and 6 deletions

View File

@ -17,7 +17,7 @@ export function createFeed(posts: Post[]): Feed {
copyright: '',
generator: 'moshing-mamut',
feedLinks: {
atom: `${BASE_URL}/feed.atom`
atom: `${BASE_URL}/feed.xml`
},
author: {
name: '@aymm',
@ -41,5 +41,5 @@ export function createFeed(posts: Post[]): Feed {
return feed;
}
export async function saveAtomFeed(feed: Feed) {
await fs.writeFile('feed.atom', feed.atom1(), { encoding: 'utf8' });
await fs.writeFile('feed.xml', feed.atom1(), { encoding: 'utf8' });
}