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

@ -18,8 +18,8 @@ export const handleError = (({ error }) => {
import type { Handle } from '@sveltejs/kit';
export const handle = (async ({ event, resolve }) => {
if (event.url.pathname === '/feed.atom') {
const f = await fs.readFile('feed.atom', { encoding: 'utf8' });
if (event.url.pathname === '/feed.xml') {
const f = await fs.readFile('feed.xml', { encoding: 'utf8' });
return new Response(
f,
{ headers: [['Content-Type', 'application/atom+xml']] }