All checks were successful
Build and Deploy Astro App / build_and_deploy (push) Successful in 50s
22 lines
No EOL
675 B
JavaScript
22 lines
No EOL
675 B
JavaScript
import rss, { pagesGlobToRssItems } from '@astrojs/rss';
|
|
|
|
export async function GET(context) {
|
|
|
|
const posts = Object.values(
|
|
import.meta.glob("./posts/*.md", { eager: true })
|
|
);
|
|
|
|
return rss({
|
|
title: 'Blauwasser Mausis | Blog',
|
|
description: 'Segeln, Fahrrad, Abenteuer',
|
|
site: context.site,
|
|
items: posts.map(post => ({
|
|
title: post.frontmatter.title,
|
|
subtitle: post.frontmatter.subtitle,
|
|
pubDate: Date.parse(post.frontmatter.date),
|
|
description: post.frontmatter.description,
|
|
link: post.url,
|
|
})),
|
|
customData: `<language>de-de</language>`,
|
|
});
|
|
} |