added date to rss feed

This commit is contained in:
ebby 2026-07-28 15:27:17 +02:00
parent 493ff30b98
commit 9cb67b692c
2 changed files with 19 additions and 9 deletions

View file

@ -1,13 +1,13 @@
---
layout: ../../layouts/BlogPostLayout.astro
title: 'Under Construction'
subtitle: "Wir befinden uns im Aufbau"
description: "Bald könnt ihr hier unsere ersten Abenteuer mitverfolgen. Und keine Sorge...an der Webseite wird auch noch gearbeitet!"
title: Under Construction
subtitle: Wir befinden uns im Aufbau
description: Bald könnt ihr hier unsere ersten Abenteuer mitverfolgen. Und keine Sorge...an der Webseite wird auch noch gearbeitet!
image:
path: "construction.png"
alt: "Under Construction"
author: 'Tim'
date: '10.07.2026'
path: construction.png
alt: Under Construction
author: Tim
date: '2026-07-10'
---
# All Endings Are Beginnings

View file

@ -1,11 +1,21 @@
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: 'Segel, Fahrrad, Abenteuer',
description: 'Segeln, Fahrrad, Abenteuer',
site: context.site,
items: await pagesGlobToRssItems(import.meta.glob('./**/*.md')),
items: posts.map(post => ({
title: post.frontmatter.title,
pubDate: Date.parse(post.frontmatter.date),
description: post.frontmatter.description,
link: post.url,
})),
customData: `<language>de-de</language>`,
});
}