Skip to content
Snippets Groups Projects
Commit 26c46e43 authored by Jannes Lücht's avatar Jannes Lücht :shark:
Browse files

:coffin: Nuke RSS capacites

parent 65a09d21
No related branches found
No related tags found
No related merge requests found
import rss from '@astrojs/rss'; // import rss from '@astrojs/rss';
import { getCollection } from 'astro:content'; // import { getCollection } from 'astro:content';
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; // import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
export async function GET(context) { // export async function GET(context) {
const posts = await getCollection('blog'); // const posts = await getCollection('blog');
return rss({ // return rss({
title: SITE_TITLE, // title: SITE_TITLE,
description: SITE_DESCRIPTION, // description: SITE_DESCRIPTION,
site: context.site, // site: context.site,
items: posts.map((post) => ({ // items: posts.map((post) => ({
...post.data, // ...post.data,
link: `/blog/${post.slug}/`, // link: `/blog/${post.slug}/`,
})), // })),
}); // });
} // }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment