fix: updates

This commit is contained in:
Morten Olsen
2025-09-23 22:59:43 +02:00
parent 4acf4093ec
commit 10886b40f5
66 changed files with 5126 additions and 5702 deletions

View File

@@ -1,17 +1,18 @@
import { data } from '@/data/data.ts'
import rss from '@astrojs/rss'
import type { APIContext } from 'astro'
import rss from '@astrojs/rss';
import type { APIContext } from 'astro';
import { data } from '@/data/data.ts';
export async function GET(context: APIContext) {
const articles = await data.articles.find()
const profile = data.profile
const articles = await data.articles.find();
const profile = data.profile;
return rss({
title: profile.basics.name,
description: profile.basics.tagline,
site: context.site || 'http://localhost:3000',
items: articles.map((article) => ({
...article.data,
link: `/articles/${article.slug}/`
}))
})
link: `/articles/${article.data.slug}/`,
})),
});
}