diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-05-19 10:00:08 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2024-05-19 10:00:08 +0100 |
| commit | cbef290b5bcbbb15db20f3943f56bf4293e42e49 (patch) | |
| tree | 9ed6c8f5af1d62000ac54205ffca52d7d8afb6f4 /website/src/pages/rss.xml.js | |
| parent | 55261df6fc572256566bfbc5a1aa1e3b97ba03e9 (diff) | |
Better RSS: post content, better positioning, TypeScript
Diffstat (limited to 'website/src/pages/rss.xml.js')
| -rw-r--r-- | website/src/pages/rss.xml.js | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/website/src/pages/rss.xml.js b/website/src/pages/rss.xml.js deleted file mode 100644 index 79da596..0000000 --- a/website/src/pages/rss.xml.js +++ /dev/null @@ -1,17 +0,0 @@ -import rss from '@astrojs/rss'; -import { getCollection } from 'astro:content'; -import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; - -export async function GET(context) { - const posts = await getCollection('blog'); - return rss({ - title: SITE_TITLE, - description: SITE_DESCRIPTION, - site: context.site, - items: posts.map((post) => ({ - ...post.data, - link: `/blog/${post.slug}/`, - pubDate: new Date(post.data.pubDate.year, post.data.pubDate.month - 1, post.data.pubDate.day), - })), - }); -} |
